Board index » delphi » Looking for a ComboBox....I’m looking for a ComboBox-type component just like the

Looking for a ComboBox....I’m looking for a ComboBox-type component just like the

Im looking for a ComboBox-type component just like the
ComboBox-type component at the top of the Object Inspector.
It looks like a ComboBox, but since the user cant edit the string,
it acts like a menu.  When the list box drops down, the string
that was originally displayed is the one highlighted in the list.
As with a menu, Im mostly interested in which line the user selected,
(first line, second line, etc.), not the actual text of that line.

Does anybody know of the whereabouts of such a component, or,
failing that, could somebody suggest the easiest way to build
one out of other components?

--Thanks

 

Re:Looking for a ComboBox....I’m looking for a ComboBox-type component just like the


There's one in Delphi.  Just use the normal TComboBox but set the style
to csDropDownList.  The only thing I can't get it to do is to not have
focus after the selection (Unlike the Object Inspector)

Quote
Sheldon Leemon wrote:

> Im looking for a ComboBox-type component just like the
> ComboBox-type component at the top of the Object Inspector.
> It looks like a ComboBox, but since the user cant edit the string,
> it acts like a menu.  When the list box drops down, the string
> that was originally displayed is the one highlighted in the list.
> As with a menu, Im mostly interested in which line the user selected,
> (first line, second line, etc.), not the actual text of that line.

> Does anybody know of the whereabouts of such a component, or,
> failing that, could somebody suggest the easiest way to build
> one out of other components?

> --Thanks

Re:Looking for a ComboBox....I’m looking for a ComboBox-type component just like the


You can use a standard TComboBox with the Style set to csDropDownList.  You
can set the selected item to the index returned by IndexOf(TheCurrentValue)
on the Items property.

--
Mark Pritchard
-------------
http://www.ozemail.com.au/~pritchma

Sheldon Leemon <ac...@detroit.freenet.org> wrote in article
<324b0cdc.6043...@news.earthlink.net>...

Quote
> Im looking for a ComboBox-type component just like the
> ComboBox-type component at the top of the Object Inspector.
> It looks like a ComboBox, but since the user cant edit the string,
> it acts like a menu.  When the list box drops down, the string
> that was originally displayed is the one highlighted in the list.
> As with a menu, Im mostly interested in which line the user selected,
> (first line, second line, etc.), not the actual text of that line.

> Does anybody know of the whereabouts of such a component, or,
> failing that, could somebody suggest the easiest way to build
> one out of other components?

> --Thanks

Other Threads