|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Data entry into ComboBoxboxs on a form. One is "source" the other "destination", I'm using a combobox each to provide MRU utility. The setting I've changed are: AutoCompleteMode -> SuggestAppend AutocompleteSource -> FileSystemDirectory Drop[DownStyle -> Drop Down Sorted -> True I populate the cbo at form load time (well, I would if I had anything with which to populate it!) I also have a browse button which sets cbo.text. I'm having two problems and obviously (as always) don't know what I'm looking for. What event(s) are fired when I change the cbo.text - as when I insert it from the folderbrowserdialogue (need to update the MRU list). - and - What event is fired when the user manually enters something and presses return. I'm seeing nothing .... If you can tell me how to tell what event is being fired, that would be even better. Thanks //al al jones wrote:
Show quoteHide quote > Okay, I'm probably re-inventing the wheel here, but I have two drop down When the text in a combo box changes, there is a TextChagned event ;)> boxs on a form. One is "source" the other "destination", I'm using a > combobox each to provide MRU utility. > > The setting I've changed are: > AutoCompleteMode -> SuggestAppend > AutocompleteSource -> FileSystemDirectory > Drop[DownStyle -> Drop Down > Sorted -> True > > I populate the cbo at form load time (well, I would if I had anything with > which to populate it!) > > I also have a browse button which sets cbo.text. > > I'm having two problems and obviously (as always) don't know what I'm > looking for. > > What event(s) are fired when I change the cbo.text - as when I insert it > from the folderbrowserdialogue (need to update the MRU list). > - and - > What event is fired when the user manually enters something and presses > return. I'm seeing nothing .... > > If you can tell me how to tell what event is being fired, that would be > even better. > > Thanks //al when the user changes the selected item, there is a SelectedItemChanged event. On 26 Nov 2006 11:27:37 -0800, lord.zol***@gmail.com wrote:
Show quoteHide quote > al jones wrote: Oh, I see, I just had it spelled wrong :)>> 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 >> combobox each to provide MRU utility. >> >> The setting I've changed are: >> AutoCompleteMode -> SuggestAppend >> AutocompleteSource -> FileSystemDirectory >> Drop[DownStyle -> Drop Down >> Sorted -> True >> >> I populate the cbo at form load time (well, I would if I had anything with >> which to populate it!) >> >> I also have a browse button which sets cbo.text. >> >> I'm having two problems and obviously (as always) don't know what I'm >> looking for. >> >> What event(s) are fired when I change the cbo.text - as when I insert it >> from the folderbrowserdialogue (need to update the MRU list). >> - and - >> What event is fired when the user manually enters something and presses >> return. I'm seeing nothing .... >> >> If you can tell me how to tell what event is being fired, that would be >> even better. >> >> Thanks //al > > When the text in a combo box changes, there is a TextChagned event ;) > when the user changes the selected item, there is a SelectedItemChanged > event. 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!' :) //alal jones wrote:
Show quoteHide quote > I just checked, it lookes like the TextChanged event doesn't have any> 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!' > :) > 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. 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
Why is this simple addition throwing an overflow exception?
calling math functions at run time Delete Directory not working Create Serial Number VS 2005 baffled at step 1 Problem saving txt box with enter key How to run and communicate a DOS program file in a VB.NET program? Can someone please translate this to VB.Net Opening...Closing Forms WIALib error |
|||||||||||||||||||||||