🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: jdbNavComboBox and eventhandling?

#9136
From: Ren� Thomsen
Date: Tue, 16 May 2000 00:00
55 lines
2531 bytes
well it works but some things dont work in some cases
when trying to remove all items in the cbox,
exception thrown like
jdbnavcombobox not mutable
basicly functions regarding the editor is not working?
cant remove items from textfield since no such function.
please help!
swing i having serious problems in this area?
"Ren� Thomsen" <rtNOSPAM@bankinvest.dk> wrote in message
news:8fooi3$3vn4@bornews.borland.com...
> 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: <8frhh5$2me2@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8fgtpv$iot2@bornews.borland.com> <391C19C5.3396C61C@home.com> <8fooi3$3vn4@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 111d45,e90c7079d92d94ee
X-Google-Attributes: gid111d45,public
From: "Ren� Thomsen" <rtNOSPAM@bankinvest.dk>
Subject: Re: jdbNavComboBox and eventhandling?
Date: 2000/05/16
Message-ID: <8frhh5$2me2@bornews.borland.com>
X-Deja-AN: 624060014
References: <8fgtpv$iot2@bornews.borland.com> <391C19C5.3396C61C@home.com> <8fooi3$3vn4@bornews.borland.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