Hide ComboBox Button Delphi without setting Style to csSimple

Tag: delphi , combobox , sendmessage , postmessage Author: pxf123 Date: 2011-11-12

I am trying to hide the dropdown button in a third party component that derives from TComboBox.

I tried setting the style to csSimple, but this solution does not work for me... There is code in the third party component that checks for csSimple in various places. I would prefer not to change this code.

From what I can see from other posts, others have suggested using a different component, eg, a textbox, or covering the dropdown arrow with something to hide it. I want to avoid these solutions too.

Is there any other way? I was thinking maybe there is a way to do this with PostMessage/SendMessage, but I don't know what to pass as params.

Thank you

It is probably unwise to compete against the control.
I agree with Andreas. Why the need to use this custom control that doesn't work for what you need? I've looked through MSDN Combo Box and there isn't any way to hide the combo button without setting the style to simple, that I can find at least.
Thanks for checking MSDN. There are circumstances when working with Legacy code that necessitate these sorts of things. I may wind up writing my own component, but a simple winmsg to hide the button would be a really helpful.
duplicate: make ComboBox drop-down button invisible in Delphi?. If you've revealed the (3rd) party, someone might have provided an answer as in the other question.
@SertacAkyuz: We are using the JVCL. Two components, The first is TJvDBLookupComboEdit, which ultimately inherits from a TCustomMaskEdit (not a TCustomComboBox), they actually have a FShowButton property which we were able to tap into. The second one is TJvDBComboBox, which does inherit from a TCustomComboBox. This is the one I am having trouble with. Thank you!