Does anyone have an idea on how to achieve this or of controls that fit
the requirement?
--
Regards,
Richard Beilby.
> Does anyone have an idea on how to achieve this or of
> controls that fit the requirement?
Use one of the grid components, or a TListView.
Gambit
You have a number of choices to consider before you start
looking for a 3rd party component. The first of which is to
OwnerDraw the TComboBox. If you add Tabs to seperate the
fields, you can use the win32 API DrawText to expand the tabs
when the string is painted.
Another choice is to use a TStringGrid with it's properties
set to make it look like a TComboBox. The catch here is that
you'll need to derive from TStringGrid so that you can
override it's CreateEditor method so that you can replace
TInplaceEdit with TInplaceEditList which supports a drop down
list.
Then you could always make your own by combining controls
(which is what TInplaceEditList does). For example, you could
have a TStringGrid which supports columns and then use the
win32 API DrawFrameControl to draw the dropdown arrow (which is what TInplaceEditList does) and then use a TListBox for the
dropdown list (which [again] is what TInplaceEditList does).
~ JD
Thank you for your reply. I have tried using a ListView, but, found it
to be unwieldy and cumbersome. I was hoping to use something similar to
a LookupComboBox that can be a neat box with an expanded drop down list
below it.
--
Regards,
Richard Beilby.
Thanks for your reply.
>
> You have a number of choices to consider before you start
> looking for a 3rd party component. The first of which is to
> OwnerDraw the TComboBox. If you add Tabs to seperate the
> fields, you can use the win32 API DrawText to expand the tabs
> when the string is painted.
When I added tabs upon running the test program the tabs appeared as
vertical bars rather than separating the text fields. Presumably, this
is why you say to use the DrawText method.
>
> Another choice is to use a TStringGrid with it's properties
> set to make it look like a TComboBox. The catch here is that
> you'll need to derive from TStringGrid so that you can
> override it's CreateEditor method so that you can replace
> TInplaceEdit with TInplaceEditList which supports a drop down
> list.
I couldn't find the property to change the appearance. Also deriving and
modifying like this is not something I have done before.
>
> Then you could always make your own by combining controls
> (which is what TInplaceEditList does). For example, you could
> have a TStringGrid which supports columns and then use the
> win32 API DrawFrameControl to draw the dropdown arrow (which is what TInplaceEditList does) and then use a TListBox for the
> dropdown list (which [again] is what TInplaceEditList does).
I am not sure how to go about this!
--
Regards,
Richard Beilby.
HB
"Richard Beilby" <R.Be...@NoSpam.co.uk> wrote in message
news:441F3A66...@NoSpam.co.uk...
Thanks to you all for your help on this one. In the end I settled for
using temporary tables with lookupcombos.
--
Regards,
Richard Beilby.