| this is maxgui GadgetDisabled() function: 
 
Function GadgetDisabled( gadget:TGadget, recursive% = False )
	If recursive Then
		While Not (gadget.State()&STATE_DISABLED)
			gadget = gadget.parent
			If Not gadget Return False
		Wend
		Return True
	EndIf	
	Return (gadget.State()&STATE_DISABLED)
End Function
 function returns 4 if gadget is disabled. so[bbcode]If GadgetDisabled(button)=True Then[/bbcode] is not "true" (because GadgetDisabled(button)=4)
 
 This works:[bbcode]If GadgetDisabled(button) Then[/bbcode]
 
 Small fix to GadgetDisabled() function(last line changed):
 
 
Return Return (gadget.State()&STATE_DISABLED)>0
 
 
 |