PDA

View Full Version : String alignment in controls



Varsuuk
July 11th, 2023, 03:08
What is the preferred method of getting right-aligned label (or in general strings, of course) vs default left or using center flag? Is it done by sizing the control to fit the string then pasting it against the other control to its right or can if be just right aligned within a control regardless of size?

Trenloe
July 11th, 2023, 08:10
Is this a base FG coding question or a Ruleset Wizard question? I ask because you mention "pasting it against the other control to its right" which sounds like you're using Ruleset Wizard.

Varsuuk
July 11th, 2023, 13:48
Regular FGU coding. I stopped my experiment with RW (which I think rocks) only because I am using mostly anchoring and the II for that with dialogs and multiple pull-down was slowing me down.

What I meant is “is the only option to shorten the control width through trial and error to just encompass displaying the label then making it anchor to the left of the next control in your UI(or next to left, whatever floats your…)

Or if there is an example of an onInit auto sizing of control to fit text or of course (but I didn’t eee) a simple Tim Olyphant thing (“<justified>right</justified>”) ;)