Page 1 of 1

Re: Readonly string gadgets?

Posted: Tue Sep 23, 2003 2:07 am
by PB
> Is there any way to change a string gadget to and from readonly dynamically?

Code: Select all

If OpenWindow(0,200,200,300,200,"test",#PB_Window_SystemMenu)
  StringGadget(0,10,10,200,20,"Click the LMB on this window")
  Repeat
    ev=WaitWindowEvent()
    If ev=#WM_LBUTTONDOWN
      locked=1-locked
      SendMessage_(GadgetID(0),#EM_SETREADONLY,locked,0)
    EndIf
  Until ev=#PB_Event_CloseWindow
EndIf

Posted: Tue Sep 23, 2003 4:41 am
by Karbon
Thanks!!!