Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java GUI > Re: disable jco...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 9625 of 9959
Post > Topic >>

Re: disable jcombobox item

by RedGrittyBrick <RedGrittyBrick@[EMAIL PROTECTED] > Apr 7, 2008 at 10:20 AM

johnmmcparland wrote:
> Hi all,
> 
> I would like to disable an item in a JComboBox.  By "disable" I mean
> to grey-it out or otherwise indicate to the user that this item is not
> a valid selection.  They should still be able to select it but it
> should look different.
> 
> I can get it to grey out the option when it is not selected but as
> soon as I select it the item has a white background - i.e. looks no
> different to the rest.
> 
> The reason for keeping the item and "greying out" is because the user
> has switched modes from one where the item was valid to one where it
> is not.
> 

The way I deal with invalid items is to just show the user the currently 
valid items. I don't leave the invalid items visible and selectable.

-- 
RGB
 




 6 Posts in Topic:
disable jcombobox item
johnmmcparland <johnmm  2008-04-07 01:50:13 
Re: disable jcombobox item
RedGrittyBrick <RedGri  2008-04-07 10:20:10 
Re: disable jcombobox item
johnmmcparland <johnmm  2008-04-07 02:32:41 
Re: disable jcombobox item
"David A. Redick&quo  2008-04-09 14:01:45 
Re: disable jcombobox item
"David A. Redick&quo  2008-04-09 14:03:08 
Re: disable jcombobox item
"David A. Redick&quo  2008-04-09 14:20:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 6:22:56 CDT 2008.