-
January 1st, 2020, 11:26 #11
You might see if there is a way to use the onLoseFocus event.
-
January 2nd, 2020, 01:07 #12
Oh, I get what you're saying now, damned. Moon Wizard clarified offset for me - that it only takes TWO values, and not four - and I should probably use bounds instead. That's where "setStaticBounds" comes in. Things make sense now.
-
January 5th, 2020, 17:19 #13
Returning after a few days break, I finally got it to work.
For reference, this is the code that I used:
Code:<label_char name="occupationlabel"> <anchored to="occupationframe" position="insidetopleft" height="15" /> <static textres="char_label_occupation" /> <script> function onFirstLayout() local nWidth,_ = getSize(); setAnchoredWidth(nWidth+10) end </script> </label_char>
This meant that I went with setAnchoredWidth() instead of setStaticBounds().
I might update the code later, since this is just my first working prototype. (To get the margins on both sides, I just included the "<center />" tag.)
Thank you again, damned. You set me on the right track.
Bidmaron, I still don't understand what you meant by lua tables, but thank you for trying to help none-the-less.
-
January 7th, 2020, 01:40 #14
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Glad you got it working. I am out of town again and will try to get you specific references for what I was talking about cuz you will probably need it at some point
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks