Hide dropdown button in ComboBox and DateTimePicker

dranko

Member
Joined
Apr 16, 2006
Messages
16
Programming Experience
Beginner
Howto hide dropdown button in ComboBox and DateTimePicker

In DataGridView (VS2005) if we choose DataGridViewComboBoxColumn there is property DisplayStyle and we can choose Nothing to hide DropDownButton.

Is there any way to hide dropdown button in ComboBox or DateTimePicker controls.
 
Just out of curiosity.... why would you want to? Other wise you end up with a one-line list box and a formated text box (for date entry).

-tg
 
I agree with TG that it would defeat the object of having a combobox etc, but it can be done if you create your own control that inherits from the combobox class and draw it yourself, just this time don't draw the drop down arrow.
 
I want to replace some texboxes on form with comboboxes because combobox have some properties that I need. For example: FormatString, databinding(DataSource, ValueMember, DisplayMember), ...
 
for formate, use a masked edit box, or see if there is someone that has provided a control that automatically will handle a particular data type.... and text boxes can be bound to... I've done it before.
 
Back
Top