Sunday, March 6, 2011

Flex: Is there anyway to disable the textfield in the NumericStepper and force the user to change the value only by using the up/down buttons?

Probably not much more to elaborate on here - I'm using a NumericStepper control and I want the user to use the buttons only to change the value in the NS, not by typing into the control - I couldn't find a property to disable the text - does it exist?

If it doesn't, how would I subclass this thing to disable the text?

From stackoverflow
  • Ok - I think I got it - there is no property you can set but you can subclass the control and set:

    mx_internal::inputField.enabled = false;
    

    Although that sets up next question about what the hell mx_internal is...

  • mx_internal is a namespace. There's a good explanation of how it all works here:

    http://nondocs.blogspot.com/2007/04/mxcoremxinternal.html

  • In general, if you're using mx_internal, there's a decent chance that your app will break between flex versions.

0 comments:

Post a Comment