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 ***
Detecting event at StringGadget ?
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Andre.
Regards
André
*** German PureBasic Support ***
It seems, that this should be the right direction. Haven't time today anymore, but will try it tomorrow. Thanks a lot !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.
Regards
André
*** German PureBasic Support ***
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tranquil.
#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
PBEventType() is able to give you the following flags depending on the string gadget:Originally posted by Pupil
Can you get something usefull with the EventType() command?
#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