pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: Adding font properties to a TextArea
Date Wed, 02 Jun 2010 22:35:36 GMT
> That worked great!  I used the fillRect() method to draw the rectangle on an
> ImageView behind my TextArea.  If the end character was of a different y
> value than the start character I just don't highlight it, which is no
> problem since I only support highlighting single words.

Glad it worked. Just curious - why you are drawing on an ImageView? Could you simply attach
a decorator to the TextArea itself and call fillRect() in the prepare() method?

> One other question, if I have a tabpane and click between tabs the focus
> goes to the first component.  Say I want to switch focus to a different
> component by default, is the only way to change that behavior by using a
> tabpaneselectionlistener?

That's one option. You could also listen for visibility changes on the tab component itself,
or you could attach a custom focus traversal policy to the tab component (assuming it is a
container; I'd probably start with this option and fall back to one of the others if it doesn't
work for some reason):


You might be able to extend ContainerSkin.IndexFocusTraversalPolicy and override the getNextComponent()
method. When the component argument is null and direction is FORWARD, you could return your
custom first component.


View raw message