CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Good point here

  1. #1
    Join Date
    Sep 2001
    Location
    Slovakia, Europe
    Posts
    58

    Good point here

    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

  2. #2
    Join Date
    Dec 2000
    Location
    Slovakia
    Posts
    1,043
    - 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured