>> Okay, I'm probably re-inventing the wheel here, but I have two drop down
>> boxs on a form. One is "source" the other "destination", I'm using a
[quoted text clipped - 28 lines]
> when the user changes the selected item, there is a SelectedItemChanged
> event.
Oh, I see, I just had it spelled wrong :)
I've been this round. What I'm seeing is TextChanged is being triggered
with each character entered (or suggestion accepted) [which I can
understand as one might want to do something as each character is
entered...] What I'm now seeing in my mru is "D", "D:", "D:\", etc, not
exactly what I had in mind. However, what I want is to trigger <something>
when they press enter after all the path / folder name has been entered.
I thought that cbox.SelectionChangeCommitted would be invoked - but even
with a breakpoint on the first line, I don't see it getting fired. Any
ideas what I'm missing here?
... and I'd really appreciate it if your reply wasn't 'stop wanting that!'
:)
//al
lord.zoltar@gmail.com - 26 Nov 2006 21:01 GMT
> Oh, I see, I just had it spelled wrong :)
>
[quoted text clipped - 11 lines]
> ... and I'd really appreciate it if your reply wasn't 'stop wanting that!'
> :)
I just checked, it lookes like the TextChanged event doesn't have any
way of telling you which key was pressed (which makes sense, because
TextChanged can occur due to non-keyboard input). You could listen to
the KeyDown or KeyPress events, because those WILL tell you which key
was pressed (e.keycode or something like that, I forget exactly ;) ).
I don't know if "Enter" key will be a problem or not... it might
trigger other behaviour, but I doubt it.
al jones - 27 Nov 2006 03:21 GMT
Refreshing this topic a little. If I change the exit to cbox1.leave then
it depends on the user to use the mouse (or tab) to go to some other box.
I find it hard to believe that MS doesn't have the enter key enabled there
so I'd guess that I'm just missing something.
Now, how do I tell which item they've selected if they select an item from
the dropdown. Reson being, once they've selected / entered / browsed to
the item, then moved out of the cbobox, I'm not displaying anything in the
text area of the combobox ....
//al