Article View: borland.public.jbuilder.java.language
Article #17641Re: Setting focus in GridControl
From: torsten.welches
Date: Tue, 13 Oct 1998 00:00
Date: Tue, 13 Oct 1998 00:00
51 lines
2222 bytes
2222 bytes
>the focus hilite to a specified row:
setSubfocus(..)
> how do I turn the hilite off and on in a column?
you need your "own" MatrixViewManager with the proper ItemPainter. I'm not at
my machine, so this is from the top of my head, so let the compiler check the
syntax.. ;-)
class YourMatrixViewManager implements MatrixViewManager {
public ItemEditor getEditor(int row, int column, java.lang.Object data, int
state) { return new TextItemEditor(); }
public ItemPainter getPainter(int row, int column, java.lang.Object data,
int state) { if (column == 0) { //<-- your column number goes here return
new FocusableItemPainter(new TextItemPainter()); } else { return return new
SelectableItemPainter(new TextItemPainter()); } }
You apply it to the grid with
yourGrid.setViewManager(new YourMatrixViewManager());
Good luck!
Torsten
In article <3622C231.30B873FF@cs.virginia.edu>,
Leo Cohen <lcohen@cs.virginia.edu> wrote:
> I'm working in one column of a two column grid control. I want to be
> able to reset the focus hilite to a specified row in this column, after
> an item move or remove. How do I do that?
>
> As a secondary question, how do I turn the hilite off and on in a
> column?
>
> --
> Leo Cohen
> 804-243-8922 (UVA)
> 804-244-4648 (home)
> 804-244-7922 (fax)
> lcohen@cs.virginia.edu
>
>
--
Torsten Welches
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Technical Details
Message-ID:
<6vvuiq$ua7$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3622C231.30B873FF@cs.virginia.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,5ece89c24cc3120a X-Google-Attributes: gidf74b3,public From: torsten.welches@gerling.de Subject: Re: Setting focus in GridControl Date: 1998/10/13 Message-ID: <6vvuiq$ua7$1@nnrp1.dejanews.com> X-Deja-AN: 400645460 References: <3622C231.30B873FF@cs.virginia.edu> X-Http-Proxy: 1.0 tidecgn0002:81, 1.0 x5.dejanews.com:80 (Squid/1.1.22) for client 193.158.55.74 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Tue Oct 13 16:19:37 1998 GMT Newsgroups: borland.public.jbuilder.java.language X-Http-User-Agent: Mozilla/2.0 (compatible; MSIE 3.02; Update a; AK; Windows NT)