Readonly string gadgets?

Just starting out? Need help? Post your questions and find answers here.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Readonly string gadgets?

Post 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
Last edited by PB on Tue Nov 12, 2013 2:06 pm, edited 1 time in total.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Thanks!!!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Post Reply