Thread: Example of "expanding" label
-
June 23rd, 2023, 05:20 #1
Example of "expanding" label
I've been using "label_fieldtop", I was wondering - is there a better way than setting a "width" element in <anchored> to make it fit longer strings? Like is there a current control that either via some API or in script takes the textres and centers it above some control?
I suspect this is a newbie question, but asking anyway (cos my way is clunky if the string resourse is changed)
-
June 23rd, 2023, 06:19 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 21,163
It all depends on how large you want the label to be.
Since string controls must have a horizontal anchor; you have to specify either a left anchor, a right anchor, or both. label_fieldtop uses "above" which sets the bottom, left and right anchors along with offsets (1 pixel above, and 3 pixels expanded on each side). You can potentially specify a larger horizontal expansion by specifying an "<anchored offset="5,1" />" in your control (or something similar).
When I find these situations, I usually shorten the label and add a hover tooltip with more information, so that the sheet doesn't become more cluttered.
Regards,
JPG
-
June 23rd, 2023, 16:51 #3
Thanks
Yup, that's what I was doing - changing the offset per control if needed it.
Yeah, I was TRYING to use the shorted label I could. But it is a "Temporary Hitpoints" and "Non-lethal Damage" numberbox. So I tried "TmpHP" and "TmpDmg" I had to expand both manually to make it work. I'd have preferred a thing that autoexpands so if I change the text in resources I didn't forget to also re-tweak the label window. Or if someone ELSE does it to internationalize it to another language they would have to know to edit the controls too. The good news is I highly doubt anyone else will be using it and needing that but still - I think of corners.
I ended up making them a good deal bigger and squoze in "Tmp HP" and "Tmp DMG" with an exact fix (and slight space either side) via trial and error size tests.
-
June 23rd, 2023, 19:28 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 21,163
THP and TDMG; plus tooltips?
Regards,
JPG
-
June 23rd, 2023, 21:48 #5
I already had the detailed tooltips it DAMMIT MAN, Thep and tdmg work for me. Obviously, brevity and clarity are neither my advantages or feats to borrow from Savage Worlds and D&D
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks