-
Color of items in combobox list
Hi all,
I have a need to change the font color for certain items in the list of a
combobox. I want to give the user a visual indication of which items are
valid selections at any given time (by greying out or highlighting the items).
Is there a way to do this using api calls or is there a third party control
that I can use?
Thanks,
-Andrew
-
Re: Color of items in combobox list
You may be able to find a control that provides this functionality.
Otherwise, the only way to do this for a standard combo box is to create an
owner-draw combo box and paint list items yourself. It can be done but is a
pain in VB.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Andrew" <andybecker@earthlink.net> wrote in message
news:39bd3e8e$1@news.devx.com...
>
> Hi all,
> I have a need to change the font color for certain items in the list of a
> combobox. I want to give the user a visual indication of which items are
> valid selections at any given time (by greying out or highlighting the
items).
> Is there a way to do this using api calls or is there a third party
control
> that I can use?
>
> Thanks,
> -Andrew
-
Re: Color of items in combobox list
You may be able to find a control that provides this functionality.
Otherwise, the only way to do this for a standard combo box is to create an
owner-draw combo box and paint list items yourself. It can be done but is a
pain in VB.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Andrew" <andybecker@earthlink.net> wrote in message
news:39bd3e8e$1@news.devx.com...
>
> Hi all,
> I have a need to change the font color for certain items in the list of a
> combobox. I want to give the user a visual indication of which items are
> valid selections at any given time (by greying out or highlighting the
items).
> Is there a way to do this using api calls or is there a third party
control
> that I can use?
>
> Thanks,
> -Andrew
-
Re: Color of items in combobox list
Hi Andrew,
Check out the OwnerList sample at www.vbbox.com. There's also one at
www.vbaccelerator.com (I think) and at www.vbthunder.com. Those should get
you started. As Jonathan says, you'll have to do an ownerdrawn listbox,
which is not particularly easy.
--
.. . . . . . . . . . . . . . . . . . . . . .
Klaus H. Probst, MVP
http://www.vbbox.com/
http://www.mvps.org/ccrp/
Please post/reply to the newsgroup(s)
"Andrew" <andybecker@earthlink.net> wrote in message
news:39bd3e8e$1@news.devx.com...
>
> Hi all,
> I have a need to change the font color for certain items in the list of a
> combobox. I want to give the user a visual indication of which items are
> valid selections at any given time (by greying out or highlighting the
items).
> Is there a way to do this using api calls or is there a third party
control
> that I can use?
>
> Thanks,
> -Andrew
-
Re: Color of items in combobox list
Hi Andrew,
Check out the OwnerList sample at www.vbbox.com. There's also one at
www.vbaccelerator.com (I think) and at www.vbthunder.com. Those should get
you started. As Jonathan says, you'll have to do an ownerdrawn listbox,
which is not particularly easy.
--
.. . . . . . . . . . . . . . . . . . . . . .
Klaus H. Probst, MVP
http://www.vbbox.com/
http://www.mvps.org/ccrp/
Please post/reply to the newsgroup(s)
"Andrew" <andybecker@earthlink.net> wrote in message
news:39bd3e8e$1@news.devx.com...
>
> Hi all,
> I have a need to change the font color for certain items in the list of a
> combobox. I want to give the user a visual indication of which items are
> valid selections at any given time (by greying out or highlighting the
items).
> Is there a way to do this using api calls or is there a third party
control
> that I can use?
>
> Thanks,
> -Andrew
-
Re: Color of items in combobox list
"Andrew" <andybecker@earthlink.net> wrote:
>
>Hi all,
>I have a need to change the font color for certain items in the list of
a
>combobox. I want to give the user a visual indication of which items are
>valid selections at any given time (by greying out or highlighting the items).
> Is there a way to do this using api calls or is there a third party control
>that I can use?
>
>Thanks,
>-Andrew
I have searched high and low for a way to modify the standard listboxes'
colors, to no avail. Instead, I now use the BeCubed Mh3dList control, which
does everything the standard listboxes do and much, much more. It gives
you complete control over all colors, even shadows, background and fill colors,
and you can set both foreground and background colors independently on each
item. It does multiple columns with optional header and/or footer. The
only application it sucks at is its checkbox mode.
This control is part of a collection called OLE Tools, which also includes
a number of other good replacements for the generic VB controls. I especially
like their option button, tab control and frame control, all of which offer
improvements over the Microsoft/Sheridan versions.
-
Re: Color of items in combobox list
"Andrew" <andybecker@earthlink.net> wrote:
>
>Hi all,
>I have a need to change the font color for certain items in the list of
a
>combobox. I want to give the user a visual indication of which items are
>valid selections at any given time (by greying out or highlighting the items).
> Is there a way to do this using api calls or is there a third party control
>that I can use?
>
>Thanks,
>-Andrew
I have searched high and low for a way to modify the standard listboxes'
colors, to no avail. Instead, I now use the BeCubed Mh3dList control, which
does everything the standard listboxes do and much, much more. It gives
you complete control over all colors, even shadows, background and fill colors,
and you can set both foreground and background colors independently on each
item. It does multiple columns with optional header and/or footer. The
only application it sucks at is its checkbox mode.
This control is part of a collection called OLE Tools, which also includes
a number of other good replacements for the generic VB controls. I especially
like their option button, tab control and frame control, all of which offer
improvements over the Microsoft/Sheridan versions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|