Article View: borland.public.jbuilder.java.language
Article #18807ListControl and KeyEvent
From: Julien Graglia
Date: Fri, 17 Apr 1998 00:00
Date: Fri, 17 Apr 1998 00:00
31 lines
1298 bytes
1298 bytes
Hi!
Here is my pb :
I need to intercept insert end delete event sent by the keyboard to a
listControl
But the core component of listView wich is extended by ListControl
define the method :
protected void processKeyPressed(KeyEvent e) {
...
}
in which it handle INSERT, BACKSPACE, HOME,.... and consume the event..
So when i declare :
void lc_keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_INSERT || (e.getKeyCode() ==
KeyEvent.VK_DOWN && e.getModifiers() == KeyEvent.CTRL_MASK) ) {
addAction();
e.consume();
} else if (e.getKeyCode() == KeyEvent.VK_DELETE || e.getKeyCode() ==
KeyEvent.VK_BACK_SPACE ) {
supprGrpAction();
e.consume();
}
}
it doesnt work !
Hope you understand what I mean...
thx, Julien.
Technical Details
Message-ID:
<3537224A.2A8032A3@netceler.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,895915419c3ccc,start X-Google-Attributes: gidf74b3,public From: Julien Graglia <jgraglia@netceler.com> Subject: ListControl and KeyEvent Date: 1998/04/17 Message-ID: <3537224A.2A8032A3@netceler.com> X-Deja-AN: 344962989 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: Wanadoo - (Client of French Internet Provider) Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language