質問

I am working on a Flex app that uses a StageTextInput which has editable set to false, but I want to manually show the blue border that always shows up when editable TextInputs are focused. I can't find this anywhere in the skin code.

Is it possible to do this in Flex?

役に立ちましたか?

解決

I found the code in SkinnableTextBase.as, under focusInHandler():

...
// the flag's old value.
var oldShowFocusIndicator:Boolean;

// Only editable text should have a focus ring.
if (enabled && editable && focusManager)
{
    oldShowFocusIndicator = focusManager.showFocusIndicator;
    focusManager.showFocusIndicator = true;
...

I needed to subclass TextInput (which is a subclass of SkinnableTextBase), and replace this with if (enabled && focusManager).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top