OpenWindow(0,100,100,640,480,"test")
Global username=ButtonGadget(#PB_Any,10,10,200,25,"Username")
Global password=ButtonGadget(#PB_Any,10,40,200,25,"Password")
Global website=ButtonGadget(#PB_Any,10,70,200,25,"Website")
Repeat
event=WaitWindowEvent()
If event=#PB_Event_Gadget
For g=username To website
If IsGadget(g) : Debug GetGadgetText(g) : EndIf
Next
EndIf
Until event=#PB_Event_CloseWindow
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
OpenWindow(0,100,100,640,480,"test")
Global username=ButtonGadget(#PB_Any,10,10,200,25,"Username")
Global password=ButtonGadget(#PB_Any,10,40,200,25,"Password")
Global website=ButtonGadget(#PB_Any,10,70,200,25,"Website")
Repeat
event=WaitWindowEvent()
If event=#PB_Event_Gadget
Select EventGadget()
Case username : Debug "username"
Case password : Debug "password"
Case website : Debug "website"
EndSelect
EndIf
Until event=#PB_Event_CloseWindow
This would be a nightmare for any decent sized application. I can't imagine having to remember (and give) unique names for hundreds of gadgets.
Best wishes to the PB community. Thank you for the memories.