Click to See Complete Forum and Search --> : Good point here


malinrob
January 14th, 2003, 01:11 PM
Thx there are good points here.

My last question: if can detect number of lines of the wrapped string from the MeasureString, is there a possibility how also to detect each text from each line?

Meanwhile I've made my own wrapper... and ..
The pity is that if I have e.g. a button textbox and label, all of them have the same size, font and text, the label wrappes in a different way than other two controls. It looks like that the area for text drawing differs in different types of controls. I could not find any function how to get the rectangle where the text is drawn for each type of control....

anyway thx for your answers

MartinL
January 14th, 2003, 01:38 PM
- You cannot directly get the string on each line if the text is wrapped. You need to compute it yourself... :( However MeasureString takes place in this task... :) Even Graphics.MeasureCharacterRanges() function could help you to solve this task...

- Yes, it is true.. It is because the label has bigger client area that the edit box or button. It can point into different text wrapping...

martin