Page 1 of 1

Strange DisableGadget()

Posted: Fri Sep 18, 2015 7:14 am
by Joestes
When I open a new window, I want to disable the gadgets on the previous window, I do it like this:

Code: Select all

Enumeration
  #imgLocatie = 10
  
  #imgLogo = #imgLocatie + 20
  #imgAdd
  #imgDel
  #imgEdit
  #imgMail
  
  #imgLoading
  
  #MainGadgetsStart ;------------------------
  
  #gimLogo
  #gimLocatie
  #gimLoading
  
  #gimgAddv
  #gimgDelv
  #gimgEditv
  #gimgMailv
  
  #gimgAddk
  #gimgDelk
  #gimgEditk
  #prgLaden
  #Panel
  
  #MainGadgetsEnd   ;------------------------
  
  #txtLocatie
  #cmbLocatie
  #txtWachtwoord
  #strWachtwoord
  #btnInloggen
  #txtLoginError
  
  #lstDeeln
  #frmDeeln
  #lstVrij
EndEnumeration
When I execute code below, it just stops after 1 gadget, while I'm sure that (most of) the gadgets are initiated!

Code: Select all

  For g = #MainGadgetsStart To #MainGadgetsEnd
    If IsGadget(g)  
      DisableGadget(g,1)
    EndIf
  Next g
What am I doing wrong?

Re: Strange DisableGadget()

Posted: Fri Sep 18, 2015 4:43 pm
by Fred
Could you post a full working snippet so I can take a closer look ?