Detecting event at StringGadget ?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Andre.

I'm searching for way to detect, when the user of my application has left one of the stringgadgets (by pressing return, tab etc. or clicking on another gadget etc.). I immediately want to check what the user has written to the StringGadget.

With #PB_EventGadget and EventGadgetID() I'm only able to detect the NEW activated gadget. Are there more "Event" constants available, for which I could check ?
(Haven't found anything on the forum or the WinAPI...)



Regards
André

*** German PureBasic Support ***
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Pupil.

Can you get something usefull with the EventType() command?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Andre.
PBEventType() is able to give you the following flags depending on the string gadget:

#PB_EventType_Focus : returned when a StringGadget() get the focus.
#PB_EventType_LostFocus : returned when a StringGadget() loose the focus.
#PB_EventType_Change : returned when a StringGadget() content change.

The both lagst constans are intresting for you. LostFocus is returned if the user clicked another gadget and the StringGadget is not able to get Datas from the user. Change_Content should be reported if the user changed the stringgadget text.
It seems, that this should be the right direction. Haven't time today anymore, but will try it tomorrow. Thanks a lot !

Regards
André

*** German PureBasic Support ***
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tranquil.
Originally posted by Pupil

Can you get something usefull with the EventType() command?
PBEventType() is able to give you the following flags depending on the string gadget:

#PB_EventType_Focus : returned when a StringGadget() get the focus.
#PB_EventType_LostFocus : returned when a StringGadget() loose the focus.
#PB_EventType_Change : returned when a StringGadget() content change.

The both lagst constans are intresting for you. LostFocus is returned if the user clicked another gadget and the StringGadget is not able to get Datas from the user. Change_Content should be reported if the user changed the stringgadget text.

Possible that helpes.

Cheers
Mike

Tranquilizer/ Secretly!
http://www.secretly.de
Registred PureBasic User
Post Reply