set wxListCtrl selection after it has been populated in the code

Xu, Ming (NIH/NLM/NCBI) [F] mxu at ncbi.nlm.nih.gov
Fri Mar 2 08:54:14 PST 2007


Quit not crashed, no matter whether SetItemState(0,
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); is called pre or post
Show().

when using virtual wxListCtrl, it is fine to call 
SetItemState(0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
Inside a non-event driven method.

ming 

-----Original Message-----
From: Milan Babuskov [mailto:milanb at panonnet.net] 
Sent: Thursday, March 01, 2007 10:48 AM
To: wx-users at lists.wxwidgets.org
Subject: Re: set wxListCtrl selection after it has been populated in the
code

Xu, Ming (NIH/NLM/NCBI) [F] wrote:
> myListCtrl ->SetItemState(0, wxLIST_STATE_SELECTED,
> wxLIST_STATE_SELECTED);
> myListCtrl->Show();

What happens if you call Show() first?

> But unfortunately  the app quits.

Quits or crashes? If it crashes, run in debugger and show us a
backtrace.



-- 
Milan Babuskov
http://www.guacosoft.com
http://www.flamerobin.org


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wx-users-help at lists.wxwidgets.org




More information about the wx-users mailing list