开发者

Giving NumericStepper's textField a unique id

开发者 https://www.devze.com 2023-04-02 01:59 出处:网络
I am trying to use the NumericStepper component in Flex and would like to give its textField (not just the whole thing) an id but not sure how. I have already given an 开发者_如何学Cid to the NumericS

I am trying to use the NumericStepper component in Flex and would like to give its textField (not just the whole thing) an id but not sure how. I have already given an 开发者_如何学Cid to the NumericStepper itself but would like to give an id to its textInput field.


It already has one. The TextInput of a NumericStepper is a skin part named textDisplay. SkinParts by definition must be defined as public variables.

So you can access it as myNumericStepperInstance.textDisplay

For example to trace out the text, you might use something like this:

trace(myNumericStepperInstance.textDisplay.text);

I'm not sure what you want to use this for, though. I'm not sure I'd recommend trying to toy with skin parts from the outside of a component. You're better off extending the component to perform your needed functionality.

0

精彩评论

暂无评论...
验证码 换一张
取 消