No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Set disabled state of buttons in a roll over canvas

    Like the example at, I want to disable some buttons based on the value of a record property. I managed to do so by overriding the show() method of the roll over canvas, loop over each member (the buttons) and call the setDisabled() method under certain circumstances.

    My only question is whether this is good practice or if there's an event method that I've missed.

    I'm using the latest 12.0p version.

    First, rollover controls like this are an approach that only works on non-touch interfaces (since touch interfaces don't have an a concept of "rollover"). So you may need a parallel interface if you plan to support mobile.

    Having said that, probably the best approach is to use mouseMove events on the ListGrid body and detect that the result of getEventRow() and/or getFocusRow() has changed from the last event. This will avoid any reliance on details of the frameworks's management of the components (we might show() them offscreen, for example), would support keyboard navigation, and the logic would be more similar to what you might implement for a parallel mobile interface.