Article View: borland.public.jbuilder.java.swing
Article #7787Re: combobox font colour
From: Marty
Date: Mon, 18 Dec 2000 12:01
Date: Mon, 18 Dec 2000 12:01
47 lines
2453 bytes
2453 bytes
so how can i do that.... i have it set up as follows
StandardComboBoxModel mLightsComboBoxModel = new StandardComboBoxModel();
StandardComboBox lightsComboBox = new StandardComboBox
(mLightsDisplayController.getLightsOptions());
// find the current value....
mLightsComboBoxModel.setSelectItem(mLightsDisplayController.getSelectedLight
Colour());
so if i get the text 'red' back, i would like this to be displayed in RED,
green in GREEN etc....
ps.... mLightsDisplayController is an instance of a class
LightsDisplayController
......getLightsOptions() populates the combobox with an array of objects
(RED, AMBER, GREEN)
.....getSelectedLightColour() gets the current value selected
hope someone can shed some 'light' on this for me
thanks
Martin
"John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message
news:MPG.14a65ad9c5abd871989dc9@forums.borland.com...
> On Fri, 15 Dec 2000 14:31:53 -0000, Marty wrote:
>
> > how do i set the colour of text (eg to RED) in a
> > comboBoxModel?
>
> A ComboBoxModel is not a GUI component, so you cannot set the text
> color there. You would have to do it in the JComboBox that displays
> the data of the ComboBoxModel.
>
> --
> Regards,
>
> John McGrath [TeamB]
>
> ---------------------------------------------------
> Before sending me e-mail, please read:
> http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<3a3dfc33_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!fr.clara.net!heighliner.fr.clara.net!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!154.32.25.24References:
<3a3a2aec_2@dnews> <MPG.14a65ad9c5abd871989dc9@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,18e72797901060ea X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2000-12-18 04:00:42 PST Reply-To: "Marty" <mlynch@telesoft-technologies.com> From: "Marty" <mlynch@telesoft-technologies.com> Newsgroups: borland.public.jbuilder.java.swing References: <3a3a2aec_2@dnews> <MPG.14a65ad9c5abd871989dc9@forums.borland.com> Subject: Re: combobox font colour Date: Mon, 18 Dec 2000 12:01:41 -0000 Lines: 49 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 NNTP-Posting-Host: 154.32.25.24 Message-ID: <3a3dfc33_1@dnews> X-Trace: 18 Dec 2000 03:59:47 -0800, 154.32.25.24 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!fr.clara.net!heighliner.fr.clara.net!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!154.32.25.24