|
Is there a way to perfectly align the first part of a string on the left side of a combobox and the 2nd part to the right without using a fixed width font? Graphics.MeasureString would allow an approximation by repeatedly adding spaces in between until the string became too long but I assume there would still be some raggedness. THe problem with a fixed width font is that it would look different tham the remainder of our app.
|
|
|
|
|
I want to display filenames+dates in a combo box and sort by date. Is there a way to do it while keeping the dates to the right of the filenames?
|
|
|
|
|
Create a datatable and add the items to it. Then sort the datatable using a dataview and set the datasource of the combobox to the dataview.
|
|
|
|
|
I suppose that would work, but it seems like alot of hoops to be jumping through.
|
|
|
|
|
how are you adding the items to the combo box?
|
|
|
|
|
Iterating an internal datastructure (hash table of wrapped classes generated by the xsd tool), and if the neccesary conditions are met, calling combobox.Items.Add(filename).
|
|
|
|
|
It's the only (and best) way to do it.
Carl Mercier
Geek entrepreneurs, visit my blog! [^]
|
|
|
|
|
Hi guys.Im in desperate need for help.Need some help to find any code for building Control System plots in C#.I mean build such plots as Bode,Nyquist etc.Its very simple to plot them in MAtlab But I have to plot them in C#.Anybody can help me ? Thank you
|
|
|
|
|
I don't know exactly what you want to draw, but you need to draw them yourself. Have you looked into the Graphics namespace ? Basically a Graphics object contains a Bitmap and has methods for drawing on it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
how can start the compile process without make run the application?
|
|
|
|
|
|
Ctrl + Shift + B
or Alt + B then release both keys and press E
R A M
|
|
|
|
|
Hi,
I'm quite new in the advanced GUI features of .NET . Can anybody tell me how to change the (back/fore)color of a scrollbar in a listbox? Did some research on the net but didn't really find a good answer.
Thanks
Gideon
|
|
|
|
|
Is this for a web based application or a windows applciation? In web based, we can use CSS style sheets to change the style of the scroll bar. In windows application, we do not have any direct means of changing the style of scrollbar. You could write a customized scroll bar that is inherited from windows scrollbar class.
Here is link for it in windows http://www.codeproject.com/vb/net/corescrollbar.asp[^]
|
|
|
|
|
Yes it is for a windows app. I saw the article before, but wasn't sure if there was a better/easier way to do it.
I know how to hide the vertical scrollbar, but how do I make the listbox scroll up or down programmatically?
Thanks,
Gideon
|
|
|
|
|
You can do this. Its a kinda hack but it works. Set the selected index to the item till where you would like to scroll down. Then set it back to -1.
Through this you could control the scroll too. I have tried it and it works.
|
|
|
|
|
Thanks, I will give it a try tomorrow.
Gideon
|
|
|
|
|
Hello,
In my application I'm using the PrintPreviewControl to let the user see the reports without having to print them. But if the system doesn't have any installed printers, an exception is thrown.
Is there any way to make the control work without having a printer? I would think that if I could just provide the paper size, the control could do its rendering correctly.
Also, I would like to change (or remove) the status dialog displayed when generating the preview. But I think it's hardwired into the control
Any suggestions?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
Not sure how to get it, but on printerless systems I've seen 'xyz file' listed as the default printer in some apps.
|
|
|
|
|
Printing to a file... could work! Let me check on it.
Thanks for the pointer!
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
hi,
I have developed an add-in for excel applications and successfully loaded/run in developed computer. But in other machines with different OS (XP , 2000 , 2003...) and Excel (2000,XP,2003...) versions i had problems.
I created a setup and tested in those systems. My problem is that :
The add-in dll is not loaded in Excel 2000. Works well in other newer versions (2003 and XP, also caused problems but solved them) but the toolbar and button is not shown in the excel.
I have tried everything about registry (LoadBehavior=3 , DLL CLSID's) and also Excel options such as "Disabled Items" and "Macro Security" etc... Those techniques worked on newer versions of Excel but I need to load my add-in in Excel 2000 too.
Do i miss something? I do not think i have a mistake on it because on newer versions works well.
I appreciate any help...
Thanx.
a.k. Mack Scynox...
|
|
|
|
|
MS changes the details of it's office interop between versions at a whim. Some of the changes are niether forward or backwards compatable. You might have to fork your sourcebase to support multiple versions.
|
|
|
|
|
I've loaded an assembly by reflection, and now wish to re-combile the resource it represents, before continuing my testing of it.
The problem i have is, once i load an assembly, it remains in use until i exit my application. I've closed all refferences to this assembly, and all types used by it have been disposed and garbage collected.
How would i go about unloading the assmebly completely from my application?
Cheers
Tris
|
|
|
|
|
Unloading of single assemblies is not possible. You can unload only at the AppDomain level, so a solution in your case could be loading your assembly in a separate appdomain and then unload it when it is no longer used.
For a better explanation on the reasons why you cannot unload single assemblies and alternative ways of doing it i suggest you
this
Bye!
|
|
|
|
|
Hi!
I'm trying to retrieve a value from a XML using XPath. However, I get this exception:
Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
My code is as following:
XPath Query: /rdf:RDF/geo:Point/geo:lat/text()
C# Code:
public static string GetValue(XPathDocument doc, string query) <br />
{<br />
XPathNavigator nav = doc.CreateNavigator(); <br />
XPathNodeIterator iter = nav.Select(query);<br />
<br />
if (iter.MoveNext()) <br />
return iter.Current.Value;<br />
else<br />
return null;<br />
}
XML:
<rdf:RDF xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<geo:Point>
<geo:long>-0.15</geo:long>
<geo:lat>50.8333333</geo:lat>
</geo:Point>
</rdf:RDF>
Anyone has an idea of what's going on? It must be pretty simple but I couldn't find much on Google.
Thanks!
|
|
|
|