🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9219

Re: jdbNavComboBox and eventhandling?

#9219
From: Ren� Thomsen
Date: Mon, 15 May 2000 00:00
41 lines
1987 bytes
it works!
that is some nice headprogrammering!

mainframe

"Paul Furbacher [TeamB]" <pnf@home.com> wrote in message
news:391C19C5.3396C61C@home.com...
> Forum Borland wrote:
> >
> > when using a swing jdbNavcombobox i want to use some events attached to
the
> > this component.
> > the keylistener events Keypressed,keyTyped, keyReleased Dont fire when
> > typing in the box.
> > i have tried making my own eventhandlers (keylistener) and adding it to
the
> > jdbnavcombobox, since components can fire events to several
eventhandlers
> > but that dont work either.
> >
> > maybe swing overides the event somehow since its used in the
functionality
> > of the component or????
>
> My guess is that since JComboBox, from which JdbNavComboBox extends (via
> another class or two), is a compound component, consisting of an editor
> and a list (did I forget something else?), you have to reach into
> this compound component and add listeners to the desired component.
>
> In this case, it would be the editor.  So, you'd write something like
> the following (I might be a little off since I don't have a Swing
> reference in front of me):
>
>   // given a JdbComboBox cb
>
>   JTextField tf = (JTextField)cb.getEditor().getEditorComponent();
>   tf.addMouseListener(new java.awt.event.MouseAdapter() {...});
>   tf.addKeyListener(...);
>
>
> Paul Furbacher (TeamB)
Technical Details
Message-ID: <8fooi3$3vn4@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8fgtpv$iot2@bornews.borland.com> <391C19C5.3396C61C@home.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,e90c7079d92d94ee
X-Google-Attributes: gid111d45,public
From: "Ren� Thomsen" <rtNOSPAM@bankinvest.dk>
Subject: Re: jdbNavComboBox and eventhandling?
Date: 2000/05/15
Message-ID: <8fooi3$3vn4@bornews.borland.com>
X-Deja-AN: 623581874
References: <8fgtpv$iot2@bornews.borland.com> <391C19C5.3396C61C@home.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing