I'd like to make a TextBox
with a Button
inside, something like a DatePicker
, but not exactly. Or can it be a ComboBox
inside the TextBox
, so you can switch the mode of the TextBox
.
Can you help me?
I'd like to make a TextBox
with a Button
inside, something like a DatePicker
, but not exactly. Or can it be a ComboBox
inside the TextBox
, so you can switch the mode of the TextBox
.
Can you help me?
The correct method of doing this is to use a control template on the textbox. Something like below. I used this inside a class that inherits from textbox and called it ButtonBox. I then inherit others from this such as DateBox, DateTimeBox, SqlServerConnectBox etc.
Edit: I've change the method I was using so that it inherits from control and not textbox. This works well because the control just consists of a border, a textbox and a button. I was getting focus issues with the above solution. This is new template, I have called my control a ButtonBox
I created a textbox control and added this It seems to work, but not the ideal situation cos it recreates another textbox.