问题
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?
回答1:
In general, if you're using mx_internal, there's a decent chance that your app will break between flex versions.
回答2:
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...
回答3:
mx_internal is a namespace. There's a good explanation of how it all works here:
http://nondocs.blogspot.com/2007/04/mxcoremxinternal.html
回答4:
If you are using the spark NumericStepper, best practice is to create a custom skin and hide the TextInput part (its a required skin part so it has to be in the skin somewhere).
回答5:
text Input has property 'editable' which can be set to false. It worked for me.
来源:https://stackoverflow.com/questions/368954/flex-is-there-anyway-to-disable-the-textfield-in-the-numericstepper-and-force-t