in reply to Vertical Height of textlabel
It depends on what toolkit you are using, but yes you usually can find what is called the "bounding box" or bbox of the text. The thing to watch out for is the fact that labels tend to be text oriented, so that height is actually the number of text lines, like 1, 2 , or 3; wheras width is the actual pixel width of the entire string. So you might get a height as 1, but width as 240.
You can look at Gtk2::Label for the complexity. It can be done, but usually you design for size flexibility, where label wrap length varies depending on the size of the main window. Also see Tk font metrics
|
|---|