开发者

How to trigger SelectIndexChanged event to VListBox?

Somebody know the VListBox? It is fast to load item to the listbox.

But I can't get the SelectIndexChanged Event be triggered by set SelectIndex. Somebody know how to trigger that event by winapi or somethi开发者_如何学Pythonng else? VlistBox source code is in the page above.


does the event get fired when you click on the item with a mouse?

if so then it may be by design. also if you are selecting it via code then a better way is not "how to manually trigger the event". consider refactoring the event handling code into a new DoSelectionChanged() method and have the code that calls SelectIndex() call that. in this way the "meaty" stuff that normally would be in an event callback can be used by other methods, not just the callback.

hope that helps


Wy don't you call the EventHandler manually?

vListBox1_selectedIndexChanged(null,null);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜