My reply didn't make much sense to me. Look at this code,
Code: Select all
If OpenWindow(0,0,0,322,100,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"StringGadget Flags") And CreateGadgetList(WindowID(0))
StringGadget(1,8, 10,306,20,"")
ButtonGadget(2,8, 40,306,20,"Change string to numeric type")
ButtonGadget(3,8, 70,306,20,"Change string to normal type")
GadgetToolTip(1,"Accept any input")
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_EventGadget
Select EventGadgetID()
Case 2
StringGadget(1,8, 10,306,20,"", #PB_String_Numeric) ;is there another way?
GadgetToolTip(1,"Only accept numbers")
Case 3
StringGadget(1,8, 10,306,20,"" );is there another way?
GadgetToolTip(1,"Accept any input")
EndSelect
EndIf
Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
IS there another way , something like setflag(#gadget,#PB_String_Numeric)
Thanks,
John Finney