开发者

Giving NumericStepper's textField a unique id

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜