Article View: borland.public.jbuilder.java.language
Article #18363double-click on grid cell
From: Alex Humphreys
Date: Thu, 02 Jul 1998 00:00
Date: Thu, 02 Jul 1998 00:00
23 lines
1375 bytes
1375 bytes
I have a cell in a grid which should mimic a combo-box. Since I can't
figure a way make a pickList editable or addable (tell me if I'm missing
something), I set up a mouse-event on a fully editable cell. Users can
single click to type in the cell or double-click to bring up a Dialog
with a grid with all the possible values.
Problem is: if the cell is already highlighted the listener only hears
one mouseclick even if the user doubleclicks (I guess mouse clicks get
lost in the testfield). Is there a way to set up a listener on the text
field in the cell? Or is there a much easier way to do all this?
Here's the relevant code:
void gridControl1_mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
coltemp = gridControl1.getSubfocus().column;
if (coltemp == my_col.getOrdinal()) {
//blah blah
}}}
Thanks.
Alex
Technical Details
Message-ID:
<359BDDEE.608F1B99@sema4.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,7042ab31608bcde,start X-Google-Attributes: gidf74b3,public From: Alex Humphreys <ahumphreys@sema4.com> Subject: double-click on grid cell Date: 1998/07/02 Message-ID: <359BDDEE.608F1B99@sema4.com> X-Deja-AN: 368174497 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language