StringGadget Properties

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
The Dutch Man
New User
New User
Posts: 1
Joined: Thu Aug 22, 2013 7:54 pm

StringGadget Properties

Post by The Dutch Man »

Is it posible to add extra properties to the StringGadget with:
Alignment, Borderstyle, FontSize, Maxlength or TabStop?
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: StringGadget Properties

Post by c4s »

- Max. length:

Code: Select all

SetGadgetAttribute(#StringGadget, #PB_String_MaximumLength, LENGTH)
- Font size:

Code: Select all

SetGadgetFont(#StringGadget, FontID(LoadFont(#PB_Any, "", SIZE)))
The other properties can probably be set with some OS-specific code. Try searching the Tips and Tricks section.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: StringGadget Properties

Post by PB »

Don't forget the StringGadget ISN'T meant to be an editor.
There's an EditorGadget that can do all you want, and more.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply