Additional StringGadget Flags

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
jb
User
User
Posts: 37
Joined: Wed Jul 14, 2004 11:58 pm
Location: United States

Additional StringGadget Flags

Post by jb »

I would like to see two additional flags for the string gadget that would allow you to limit the number of characters that can be entered and a flag that would allow the text in the string gadget to be selected when the gadget receives focus.

Currently you have to use Windows API commands like:

Code: Select all

SendMessage_(GadgetID(#String_Gadget), #EM_LIMITTEXT, 15, 0)

SendMessage_(GadgetID(#String_Gadget), #EM_SETSEL, 0, -1)
They may have to be implemented as SetGadgetState() flags.

This would be very nice for cross platform applications.
-jb
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

I 2nd this. Would be also nice to have a centered flag for the string gadget :)
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Re: Additional StringGadget Flags

Post by Dr. Dri »

jb wrote:They may have to be implemented as SetGadgetState() flags.

This would be very nice for cross platform applications.
GetGadgetAttribute() and SetGadgetAttribute() would be perfect to do this

Dri :D
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Yes, natively is always preferable to API as then it can be used across platforms.
Last edited by netmaestro on Tue Feb 21, 2006 6:45 pm, edited 2 times in total.
BERESHEIT
jb
User
User
Posts: 37
Joined: Wed Jul 14, 2004 11:58 pm
Location: United States

Post by jb »

Dr. Dri wrote:GetGadgetAttribute() and SetGadgetAttribute() would be perfect to do this
Yes, I agree that would be the perfect place to do this.
-jb
Post Reply