Hi,
I have a prob a StringGadget wat have the FLAG "#PB_String_Password" and use the event #PB_EventType_ReturnKey.
Normal you cant work with the Flag "#PB_String_Password" and "ES_MULTILINE".
But for work with the event "#PB_EventType_ReturnKey" of a StringGadget with FLAG "#PB_String_Password" you must also set the "ES_MULTILINE" Flag so that yiu can show for the event "#PB_String_Password".
If you work with "#PB_String_Password" and "ES_MULTILINE" in one Gadget, you dont habe a real passwordgadget but the "#PB_EventType_ReturnKey" works.
How i can use the event "#PB_EventType_ReturnKey" of a stringgadget with the flag ""#PB_String_Password""
regrads,
nico
StringGadget prob with #PB_EventType_ReturnKey
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Code: Select all
OpenWindow(0,0,0,320,240,"",$CA0001)
CreateGadgetList(WindowID(0))
StringGadget(0,20,50,100,20,"",#PB_String_Password)
StringGadget(1,20,80,100,20,"")
SetActiveGadget(0)
Repeat
ev = WaitWindowEvent()
Select ev
Case #PB_Event_Gadget
Select EventGadget()
Case 0
If EventType() = #PB_EventType_Focus
AddKeyboardShortcut(0, #PB_Shortcut_Return, 1)
ElseIf EventType() = #PB_EventType_LostFocus
RemoveKeyboardShortcut(0, #PB_Shortcut_Return)
EndIf
EndSelect
Case #PB_Event_Menu
Select EventMenu()
Case 1
keybd_event_(#VK_TAB, 0,0,0)
keybd_event_(#VK_TAB, 0,#KEYEVENTF_KEYUP,0)
EndSelect
EndSelect
Until ev=#WM_CLOSE
BERESHEIT