0 Replies Latest reply on Aug 13, 2009 10:28 AM by arby10101

    problem with disabling spark VGroup

    arby10101

      I have two groups of controls (labels, check boxes, textInput, etc.) that I want to start out disabled, grayed out and not accepting input. Depending on which radio button the user selects, one or the other of the groups becomes enabled. Each group is contained within a spark VGroup. Here is a simplified example:

       

      <s:VGroup enabled="false">
          <mx:Label text="Fixed display size" />
          <s:HGroup>
              <s:HGroup><mx:Label text="Width" />
                  <s:TextInput text="800"  width="50" /></s:HGroup>
              <s:HGroup><mx:Label text="Height" />
                  <s:TextInput text="600"  width="50" /></s:HGroup>
          </s:HGroup>
      </s:VGroup>

       

      The documentation for the "enabled" property of a VGroup says "If you set the enabled property to false  for a container, Flex dims the color of the container and of all of its children, and blocks user input to the container and to all of its children."

       

      In the mxml above, user input is blocked but the neither the labels nor the input boxes are dimmed (grayed-out). The only way I've found to get them to the system notEnabled appearance is to put enabled="false" on each individual element. This works but it's inconvenient because the actual control groups are bigger than the one shown and I have to keep enabling and disabling them whenever the user picks a different radio button.

       

      What am I doing wrong? Thanks in advance.