Dynamic Forms

  • Thread starter Thread starter Dan Diephouse
  • Start date Start date
D

Dan Diephouse

I need to implement a couple forms for our application which are
dynamic. For instance, I have a question and several possible answers
which the user can select. I don't know the question/answers at design
time, so I need to create the form on the fly. My question is: when I'm
placing these controls whats the best/easiest way to tell how much space
I need for a label given the text string?

For instance the question "Do you like ice cream?" will certainly take
less space than "Do you like chocolate-fudge-peanut-butter ice cream?"
I need to figure out how many lines they will take given a font and font
size.

Cheers,

- Dan
 
in my custom controls i m using Graphics.MeasureString. it gives the
size (width and height) of a string according to the font.
i don't know if it could help you.
 
Naim said:
in my custom controls i m using Graphics.MeasureString. it gives the
size (width and height) of a string according to the font.
i don't know if it could help you.

Thats perfect. Thanks!
 
Back
Top