About   |   Getting Started   |   Downloads   |   Documentation   |   Forum


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi-line labels
04-18-2016, 02:50 PM
Post: #1
Multi-line labels
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
Find all posts by this user
Quote this message in a reply
04-19-2016, 10:51 AM
Post: #2
RE: Multi-line labels
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...
Find all posts by this user
Quote this message in a reply
04-21-2016, 10:27 AM
Post: #3
RE: Multi-line labels
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::setHeight() method.
Find all posts by this user
Quote this message in a reply
04-21-2016, 02:55 PM
Post: #4
RE: Multi-line labels
Thanks, Garrett! Note to self: always check functions of superclass...
Find all posts by this user
Quote this message in a reply
05-22-2016, 04:02 PM
Post: #5
RE: Multi-line labels
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.
Find all posts by this user
Quote this message in a reply
05-23-2016, 03:18 PM
Post: #6
RE: Multi-line labels
No, we don't provide any way to perform what you're looking for.
Find all posts by this user
Quote this message in a reply
04-05-2017, 04:26 PM
Post: #7
RE: Multi-line labels
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?
Find all posts by this user
Quote this message in a reply
04-06-2017, 05:13 PM
Post: #8
RE: Multi-line labels
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)