StringGadget right alignment

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BorisTheOld
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Apr 24, 2012 5:08 pm
Location: Ontario, Canada

Re: StringGadget right alignment

Post by BorisTheOld »

@Fred
Fred wrote:Using other gadget flags is not supported, use SetWindowLong_() on Windows if you want to change the style
We use code similar to Shardik to make our GUI classes cross-platform. It's not a big problem for us, but it can be for less experienced programmers who are trying to write cross-platform applications.

Given the ease with which string gadgets can be aligned with user code, can #PB_STRING_LEFT and #PB_STRING_RIGHT be allowed when creating a string gadget?

Thanks
For ten years Caesar ruled with an iron hand, then with a wooden foot, and finally with a piece of string.
~ Spike Milligan
ken_anthony
User
User
Posts: 77
Joined: Thu Jun 20, 2013 5:41 am
Location: Springerville AZ USA

Re: StringGadget right alignment

Post by ken_anthony »

Well done. It worked. This is the code I needed.

Code: Select all

ImportC ""
    gtk_entry_set_alignment(Entry.I, XAlign.F)
EndImport
gtk_entry_set_alignment(GadgetID(0), 1)
Post Reply