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
Rick Rothstein - 27 Dec 2004 05:57 GMT
Almost everybody in this newsgroup is using VB6 or lower. While you may
get a stray answer to VB.NET (including VB2003 and VB2005 which has
dropped .NET from its name) questions here, you should ask them in
newsgroups devoted exclusively to .NET programming. Look for newsgroups
with either the word "dotnet" or "vsnet" in their name.
For the microsoft news server, try these newsgroups...
microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb
microsoft.public.vsnet.general
There are some others, but these should get you started.
Rick - MVP
> 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
[quoted text clipped - 22 lines]
> Respectfully,
> Brian Hasden
hasden - 30 Dec 2004 00:55 GMT
Thanks a lot. I wasn't sure if I was in the right group or not, but
couldn't find anything for .Net. I appreciate your help.