Found an issue in SpiderBasic ? Please report it here !
Geert
 
Posts: 7
Joined: Sat Dec 26, 2015 10:17 am

SpinGadget with ReadOnly flag becomes editable

by Geert Thu May 28, 2020 9:10 am

A SpinGadget with ReadOnly flag becomes editable after disabling and re-enabling the parent window.
No problem with a StringGadget.

Code: Select all
Procedure Button_Event()
 Static Disabled=0
 
 Disabled!1
 DisableWindow(0,Disabled)
EndProcedure

If OpenWindow(0, 10, 10, 140, 115, "Window 1", #PB_Window_SystemMenu)
 SpinGadget(0, 20, 20, 100, 25, 0, 100, #PB_Spin_ReadOnly|#PB_Spin_Numeric)
 StringGadget(1, 20, 65, 100, 25,"String", #PB_String_ReadOnly)
 SetGadgetState (0, 5)
 If OpenWindow(1, 160, 10, 240, 70, "Window 2", #PB_Window_SystemMenu)
  ButtonGadget(2, 20, 20, 200, 25, "Disable/enable window 1")
  BindGadgetEvent(2,@Button_Event())
 EndIf
EndIf
Return to Bugs Reports

Who is online

Users browsing this forum: No registered users and 5 guests