开发者

selectRange does not work

This code does not work and I have no idea why. Seems so simple, an开发者_运维知识库d nearly straight out of the help doc:

http://forums.adobe.com/thread/781926#

Actually, it looks like the text is kind of selected, its sort of light gray highlighted, but when I select it using the mouse it is highlighted blue, and is obviously selected. Is the light gray highlighting what is supposed to happen when using selectRange()?

Amazing but true, the light-gray background is controlled by the unfocusedTextSelectionColor style property, and the light-blue background is controlled by the focusedTextSelectionColor style property.

Of course, the help doc does not seem to mention this, at least not in the section I was reading, so maybe I should be so hard on its writers, but mentioning this seems important.


winging it a bit here, but you probably need to call .focus() on your text widget, or some similarly focusing public method.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜