SpinGadget ~ Text positioning in centre / left / right

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

SpinGadget ~ Text positioning in centre / left / right

Post by RichardL »

Hi,

The ability to position text in the SpinGadget would be useful.
It looks a little weird with strings appearing on the right.

RichardL
mestnyi
Addict
Addict
Posts: 1098
Joined: Mon Nov 25, 2013 6:41 am

Re: SpinGadget ~ Text positioning in centre / left / right

Post by mestnyi »

Hi how can you position the text to the left :?:
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: SpinGadget ~ Text positioning in centre / left / right

Post by IdeasVacuum »

If we are talking about the Spin Gadget numerical text, it is normal to have numbers justified right.

Work-around
It's easy to make your own custom spin gadget with a Text Gadget/String Gadget and two Button Image Gadgets.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
mestnyi
Addict
Addict
Posts: 1098
Joined: Mon Nov 25, 2013 6:41 am

Re: SpinGadget ~ Text positioning in centre / left / right

Post by mestnyi »

If we are talking about the Spin Gadget numerical text, it is normal to have numbers justified right.
Maybe justified, but it is wrong, because the possibility of greatly narrowed
It's easy to make your own custom spin gadget with a Text Gadget/String Gadget and two Button Image Gadgets.
Not so that it's easy to.
But I found a solution for windows

Code: Select all

  SetWindowLongPtr_(GadgetID(Gadget), #GWL_STYLE, GetWindowLongPtr_(GadgetID(Gadget), #GWL_STYLE) | #ES_CENTER)
        
And here of course Surprise "ES_CENTER" aligns to the left edge
Post Reply