Hot Door CORE Forum
Multi-line labels - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: General discussion (http://hotdoorcore.com/forum/forumdisplay.php?fid=3)
+--- Thread: Multi-line labels (/showthread.php?tid=68)



Multi-line labels - Rick Johnson - 04-18-2016

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


RE: Multi-line labels - Rick Johnson - 04-19-2016

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...


RE: Multi-line labels - garrett - 04-21-2016

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.


RE: Multi-line labels - Rick Johnson - 04-21-2016

Thanks, Garrett! Note to self: always check functions of superclass...


RE: Multi-line labels - Rick Johnson - 05-22-2016

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.


RE: Multi-line labels - garrett - 05-23-2016

No, we don't provide any way to perform what you're looking for.


RE: Multi-line labels - Rick Johnson - 04-05-2017

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?


RE: Multi-line labels - garrett - 04-06-2017

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.