Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Compiler Framework Redesign => Topic started by: ollydbg on July 05, 2012, 10:41:35 am

Title: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
Post by: ollydbg on July 05, 2012, 10:41:35 am
My friend nanyu complains the wxLB_MULTIPLE feature in the build option setting dialog changed after rev 7569.

Firstly, he thought that there are some thing wrong, he guess that a "CTRL" key is holding on when he click on the search directory wxListBox.

So, he just suggest that if  we could revert the rev 7569, and handle the real "CTRL". (Normally, people will thought that holding down the CTRL key, and mouse click will select multiply items, but single click will just select only one item)

Any ideas?
Title: Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
Post by: MortenMacFly on July 05, 2012, 12:04:51 pm
Any ideas?
If you revert that, you can no longer copy multiple options between project/target options. So we loose an important feature, therefore not a good idea. The right way would be to figure out if either one can control the behaviour of multiple selections or complain to the wxDevs as this is not standard.
Title: Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
Post by: MortenMacFly on July 05, 2012, 12:09:28 pm
...on the other hand: What if you simply replace wxLB_MULTIPLE with wxLB_EXTENDED in compiler_options.xrc? If the functionality remains, that would be an option.
Title: Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
Post by: jens on July 05, 2012, 01:06:22 pm
For the record:
this seems to be a wxMSW issue, it works as expected on linux (CTRL to select multiple, random entries, SHIFT to select a range of entries), on windows none of the keys seems to do anything.

wxLB_EXTENDED works on linux, I can not test on windows at the moment.
Title: Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
Post by: MortenMacFly on July 05, 2012, 02:09:26 pm
this seems to be a wxMSW issue,
Interesting... so it may be a mug in the list control? I wonder if that has changed in wx 2.9.x. I'll try that when I am at home.
Title: Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
Post by: ollydbg on July 05, 2012, 04:31:40 pm
...on the other hand: What if you simply replace wxLB_MULTIPLE with wxLB_EXTENDED in compiler_options.xrc? If the functionality remains, that would be an option.
I just test it, and it works OK!

http://docs.wxwidgets.org/2.8/wx_wxlistbox.html

It looks like:
Quote
Window styles

wxLB_SINGLE    Single-selection list.
wxLB_MULTIPLE    Multiple-selection list: the user can toggle multiple items on and off.
wxLB_EXTENDED    Extended-selection list: the user can select multiple items using the SHIFT key and the mouse or special key combinations.
wxLB_HSCROLL    Create horizontal scrollbar if contents are too wide (Windows only).
wxLB_ALWAYS_SB    Always show a vertical scrollbar.
wxLB_NEEDED_SB    Only create a vertical scrollbar if needed.
wxLB_SORT    The listbox contents are sorted in alphabetical order.

Note that wxLB_SINGLE, wxLB_MULTIPLE and wxLB_EXTENDED styles are mutually exclusive and you can specify at most one of them (single selection is the default).

EDIT:
http://docs.wxwidgets.org/trunk/classwx_list_box.html
Quote
wxLB_MULTIPLE:
Multiple-selection list: the user can toggle multiple items on and off. This is the same as wxLB_EXTENDED in wxGTK2 port.
wxLB_EXTENDED:
Extended-selection list: the user can extend the selection by using SHIFT or CTRL keys together with the cursor movement keys or the mouse.
So, under linux, they are the same, but under windows, we should use wxLB_EXTENDED.
Title: Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
Post by: MortenMacFly on July 05, 2012, 06:26:36 pm
...on the other hand: What if you simply replace wxLB_MULTIPLE with wxLB_EXTENDED in compiler_options.xrc? If the functionality remains, that would be an option.
I just test it, and it works OK!
Then, go ahead and commit.

BTW: You might want to to check the other UI resources for the same issue, too.
Title: Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
Post by: ollydbg on July 06, 2012, 12:58:09 pm
Done in rev 8084, I searched all the C::B source/xrc, so I think I have fixed all such issue.
Title: Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
Post by: Kalith on July 08, 2012, 01:39:11 am
Great ! Then I think you can close this bug report of mine :
https://developer.berlios.de/bugs/?func=detailbug&bug_id=18613&group_id=5358
Title: Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
Post by: ollydbg on July 08, 2012, 03:29:44 am
Great ! Then I think you can close this bug report of mine :
https://developer.berlios.de/bugs/?func=detailbug&bug_id=18613&group_id=5358
Done, thanks.
Title: Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
Post by: nanyu on July 10, 2012, 12:04:25 pm
thanks!