Hi,
I have recently found that I cannot get wxListBox-es to clear their selection. I have attached an example program demonstrating this problem (bug?).
The code is being compiled by wx2.8.11 using tdm-gcc32, windows 7
$ wx-config --cflags
-I/usr/local/lib/wx/include/msw-unicode-release-2.8 -I/usr/local/include/wx-2.8 -DWXUSINGDLL -D__WXMSW__ -mthreads
$ wx-config --version
2.8.11
To reproduce bug:
Compile:
$ g++ *cpp `wx-config --cflags --libs`
Run:
$./a.exe
then click File->About.
Then note that the item is selected, where I have set the selection to wxNOT_FOUND. According to the docs, this is supposed to
"Sets the selection to the given item n or removes the selection entirely if n == wxNOT_FOUND."
Does anyone have any work-arounds? Appending items seems to always append them in the selected state.
The code works fine under GTK and mac OSX..
Thanks,
SetSelection(wxNOT_FOUND) not working under windows? Topic is solved
SetSelection(wxNOT_FOUND) not working under windows?
- Attachments
-
- hworld.cpp
- (1.73 KiB) Downloaded 79 times
I had a thought... Its a 32 bit binary on a 64 bit system. I looked through the wx code, and it is using SendMessage(...) for CB_SETCURSEL : does this need to be a 64 bit -1, or a 32 bit -1?
http://msdn.microsoft.com/en-us/library ... S.85).aspx
http://msdn.microsoft.com/en-us/library ... S.85).aspx