Re: Win32Lib: setIndex not trigger onChange event?
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 19, 2007
- 501 views
Dan Moyer wrote: > > > I have a list that when any item is selected fills *another* list with > appropriate items; but sometimes rather than *user* selecting an item in the > first list, the action of some other control intends to do so, via "setIndex". > > When the user selects an item, onChange event is triggered, but when > "setIndex" > is used, the onChange event is NOT triggered. I can call the onChange > procedure > myself, but it would be better if setIndex did so itself, wouldn't it? Triggering the Change event is the way Visual Basic does it too, and I have not so fond memories of adding special code to avoid running the trigger every time I set an index via the program's own code. So how about we let you decide on a per list basis. Would a method to flag a list as one that requires setIndex and setText to trigger an w32HChange event do? I could even add into the parameter data to the event handler an indication whether or not the event was operator or program initiated. -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell