H
hasden
I'm working in .NET and I can't seem to get the behavior that I need
from the combobox. I'm sure it's possible, I just don't have the .NET
experience. Any help would be greatly appreciated. I need a combobox
with the following behavior:
- The user can type in any text they want
- When the user clicks the drop down button and selects an item from
the combobox the text for that item should be appended to the end of
the text already existing in the combo box.
For example: if the user types 'hello' into the combo box and then
clicks the drop down button and selects 'world', the control would then
append 'world' to the end of the existing 'hello' to end with 'hello
world'. I've tried overriding OnSelectionChangeCommitted,
OnSelectedValueChanged, OnSelectedItemChanged, and
OnSelectedIndexChanged, but to no avail. When I modify the .Text
property of the combobox while inside any of those events it does not
appear to change (I can force the change by refreshing the control with
Invalidate() or Refresh()), but once it exists the event, the .Text
property is then overwritten with the text that the user clicked from
the drop down. I'm sure this all sounds crazy easy, but I just can't
get it. Once again, I appreciate everyone's help. Hope you all had a
happy holiday season.
Respectfully,
Brian Hasden
from the combobox. I'm sure it's possible, I just don't have the .NET
experience. Any help would be greatly appreciated. I need a combobox
with the following behavior:
- The user can type in any text they want
- When the user clicks the drop down button and selects an item from
the combobox the text for that item should be appended to the end of
the text already existing in the combo box.
For example: if the user types 'hello' into the combo box and then
clicks the drop down button and selects 'world', the control would then
append 'world' to the end of the existing 'hello' to end with 'hello
world'. I've tried overriding OnSelectionChangeCommitted,
OnSelectedValueChanged, OnSelectedItemChanged, and
OnSelectedIndexChanged, but to no avail. When I modify the .Text
property of the combobox while inside any of those events it does not
appear to change (I can force the change by refreshing the control with
Invalidate() or Refresh()), but once it exists the event, the .Text
property is then overwritten with the text that the user clicked from
the drop down. I'm sure this all sounds crazy easy, but I just can't
get it. Once again, I appreciate everyone's help. Hope you all had a
happy holiday season.
Respectfully,
Brian Hasden