Hot Door CORE Forum

Full Version: Multi-line labels
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to create a label widget that's two lines high? My text is two lines, but it doesn't size automatically so the second line is mostly cropped off. There's no way I found to set the height of either a label or a widget. It would be nice to also have options like making the text flush right, left, or centered, but for now just having the text color adjust for dark UI is a big plus. -- rj
Oops, just found the functions to set font attributes. Debating whether to overlap two labels for two lines of text, or to just rephrase the label...
Since Illustrator itself doesn't really utilize multi-line labels (aside from warning/error dialogs), we opted not to provide full support. However, you should be able to get the same effect by forcing the label to be taller by calling the hdi::core::Widget:ConfusedetHeight() method.
Thanks, Garrett! Note to self: always check functions of superclass...
The setHeight() method does work great for multi-line labels.

But users always want more, don't we? I'm building an About box that has some finer touches as found in CADtools' About box. Is there a simple way to create a solid-colored panel for a background? I made a label filled with an image, which works.

Is it possible to create labels in dialogs with smaller text, and to specify the color? I suppose I could just use a graphic with alternatively-sized and styled text in it, but I'm sure it would appear much sharper if rendered as actual text.
No, we don't provide any way to perform what you're looking for.
I really didn't expect to visit this thread again and I have to admit I'm embarrassed to even ask this. When text is too long to fit in one line, it does wrap to the next line if the label is tall enough. When I want to break a line in a specific place, I just insert "\n" on the Mac, but in Windows it insists on flowing as one long line regardless of whether the text includes \n, \r\n, \r, or even \r\r\n. Very perplexing. Is there just not a way to manually break text lines in Windows?
This isn't possible on Windows with hdi_core at this time.

It might be possible in a future version with some changes to the underlying Windows control, so I'll look into it. However, it's a low-priority fix for now.