Click here to Skip to main content
15,918,596 members
Home / Discussions / C#
   

C#

 
GeneralRe: NEED HELP - Urgent Pin
led mike5-Jan-07 5:14
led mike5-Jan-07 5:14 
Questiontree view & XML? Pin
sajid.salim.khan5-Jan-07 3:36
sajid.salim.khan5-Jan-07 3:36 
AnswerRe: tree view & XML? Pin
Not Active5-Jan-07 3:46
mentorNot Active5-Jan-07 3:46 
GeneralRe: tree view & XML? Pin
Pete O'Hanlon5-Jan-07 4:15
mvePete O'Hanlon5-Jan-07 4:15 
GeneralBut Sir Pin
sajid.salim.khan5-Jan-07 7:09
sajid.salim.khan5-Jan-07 7:09 
QuestionSet width of text part of combo Pin
Russell Jones5-Jan-07 2:29
Russell Jones5-Jan-07 2:29 
AnswerRe: Set width of text part of combo Pin
Russell Jones5-Jan-07 3:25
Russell Jones5-Jan-07 3:25 
AnswerRe: Set width of text part of combo Pin
Larantz5-Jan-07 13:57
Larantz5-Jan-07 13:57 
You could always use the Graphics objects MeasureString method using the font of the combobox. Iterate through the various strings in the combo for the longest one and then measure it.

Finally you can calculate and set the new width of the combobox:
cmbbox.Width = stringsize.Width + (cmbbox.Width - cmbbox.ClientSize);

Think that should be sufficient.

Hope that might be of some help.
Best regards!
-Larantz-

for those about to code, we salute you
http://www.tellus-software.com

Generaldirectory of execution Pin
V.5-Jan-07 1:57
professionalV.5-Jan-07 1:57 
GeneralRe: directory of execution Pin
User 66585-Jan-07 2:14
User 66585-Jan-07 2:14 
GeneralRe: directory of execution Pin
V.5-Jan-07 2:21
professionalV.5-Jan-07 2:21 
GeneralRe: directory of execution Pin
Dominik Reichl5-Jan-07 2:16
Dominik Reichl5-Jan-07 2:16 
GeneralRe: directory of execution Pin
V.5-Jan-07 2:21
professionalV.5-Jan-07 2:21 
GeneralRe: directory of execution Pin
Steve Hansen5-Jan-07 2:17
Steve Hansen5-Jan-07 2:17 
GeneralRe: directory of execution Pin
V.5-Jan-07 2:22
professionalV.5-Jan-07 2:22 
GeneralRe: directory of execution Pin
ednrgc5-Jan-07 3:35
ednrgc5-Jan-07 3:35 
GeneralRe: directory of execution Pin
V.5-Jan-07 3:43
professionalV.5-Jan-07 3:43 
GeneralRe: directory of execution Pin
ednrgc5-Jan-07 3:46
ednrgc5-Jan-07 3:46 
GeneralRe: directory of execution Pin
Pete O'Hanlon5-Jan-07 4:15
mvePete O'Hanlon5-Jan-07 4:15 
QuestionNamespace Extension (urgent) Pin
Member 26928295-Jan-07 1:33
Member 26928295-Jan-07 1:33 
AnswerRe: Namespace Extension (urgent) Pin
ednrgc5-Jan-07 1:43
ednrgc5-Jan-07 1:43 
GeneralRe: Namespace Extension (urgent) Pin
lost in transition 5-Jan-07 3:34
lost in transition 5-Jan-07 3:34 
QuestionShell Namespace Extension (urgent) Pin
Member 26928295-Jan-07 1:31
Member 26928295-Jan-07 1:31 
Questionwhy my datareader object of oledb in C# not properly reading Pin
kalaveer5-Jan-07 0:46
kalaveer5-Jan-07 0:46 
AnswerRe: why my datareader object of oledb in C# not properly reading Pin
ednrgc5-Jan-07 1:51
ednrgc5-Jan-07 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.