Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Arguments! C# Pin
Nagy Vilmos3-Jun-09 4:22
professionalNagy Vilmos3-Jun-09 4:22 
GeneralRe: Arguments! C# Pin
Baeltazor3-Jun-09 4:20
Baeltazor3-Jun-09 4:20 
GeneralRe: Arguments! C# Pin
Baeltazor3-Jun-09 4:28
Baeltazor3-Jun-09 4:28 
Questionthis.Refresh Pin
gwithey3-Jun-09 3:50
gwithey3-Jun-09 3:50 
AnswerRe: this.Refresh Pin
NickPace3-Jun-09 4:00
NickPace3-Jun-09 4:00 
GeneralRe: this.Refresh Pin
gwithey3-Jun-09 4:15
gwithey3-Jun-09 4:15 
GeneralRe: this.Refresh Pin
S. Senthil Kumar3-Jun-09 5:08
S. Senthil Kumar3-Jun-09 5:08 
QuestionAutomatically sizing a button based off data source Pin
EliottA3-Jun-09 3:46
EliottA3-Jun-09 3:46 
Sorry for the indescriptive title in advance, I figured that is what suited the problem at hand best.

I'm creating a menu based off a data source and dynamically adding buttons. The width of the menu should be set by the 'longest' string that is to be displayed on any of the buttons, so my question is how do i know what size to set my button to based off of the text to be displayed?

An example of such would be the following string array:

"Help"
"Option 1"
"This is a longer option"


All buttons should be set to have a width wide enough to display "This is a longer option" so that all menu buttons have an equal width. My question, how do I translate that string of text into a width in pixels to resize my button to?

If my problem is not descriptive or clear enough, sorry in advance and I'd be happy to clear anything up. Thanks for the view in advance.


AnswerRe: Automatically sizing a button based off data source Pin
Henry Minute3-Jun-09 5:32
Henry Minute3-Jun-09 5:32 
GeneralRe: Automatically sizing a button based off data source Pin
EliottA3-Jun-09 5:39
EliottA3-Jun-09 5:39 
AnswerRe: Automatically sizing a button based off data source Pin
Moreno Airoldi3-Jun-09 5:40
Moreno Airoldi3-Jun-09 5:40 
GeneralRe: Automatically sizing a button based off data source Pin
EliottA3-Jun-09 5:54
EliottA3-Jun-09 5:54 
QuestionTransform non english words to a unique representation Pin
HZ_793-Jun-09 2:30
HZ_793-Jun-09 2:30 
AnswerRe: Transform non english words to a unique representation Pin
Uwe Keim3-Jun-09 2:36
sitebuilderUwe Keim3-Jun-09 2:36 
GeneralRe: Transform non english words to a unique representation Pin
HZ_793-Jun-09 2:48
HZ_793-Jun-09 2:48 
GeneralRe: Transform non english words to a unique representation Pin
Luc Pattyn3-Jun-09 3:33
sitebuilderLuc Pattyn3-Jun-09 3:33 
AnswerRe: Transform non english words to a unique representation Pin
Daniel Grunwald3-Jun-09 4:48
Daniel Grunwald3-Jun-09 4:48 
QuestionRegistry/System updating.......?? Pin
Hum Dum3-Jun-09 2:05
Hum Dum3-Jun-09 2:05 
AnswerRe: Registry/System updating.......?? Pin
Dave Kreskowiak3-Jun-09 3:27
mveDave Kreskowiak3-Jun-09 3:27 
GeneralRe: Registry/System updating.......?? Pin
Hum Dum3-Jun-09 19:56
Hum Dum3-Jun-09 19:56 
GeneralRe: Registry/System updating.......?? Pin
Dave Kreskowiak4-Jun-09 1:20
mveDave Kreskowiak4-Jun-09 1:20 
AnswerRe: Registry/System updating.......?? Pin
harold aptroot3-Jun-09 3:43
harold aptroot3-Jun-09 3:43 
GeneralRe: Registry/System updating.......?? Pin
Hum Dum3-Jun-09 19:59
Hum Dum3-Jun-09 19:59 
GeneralRe: Registry/System updating.......?? Pin
harold aptroot3-Jun-09 23:42
harold aptroot3-Jun-09 23:42 
QuestionAsyncCallback Pin
yesu prakash3-Jun-09 2:03
yesu prakash3-Jun-09 2:03 

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.