Author Topic: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining  (Read 9869 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
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?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9414
Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9414
Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
« Reply #2 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Online jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7164
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
« Reply #3 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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9414
Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
« Reply #4 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
« Reply #5 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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9414
Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
« Reply #6 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
« Reply #7 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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Kalith

  • Multiple posting newcomer
  • *
  • Posts: 67
Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
« Reply #8 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

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline nanyu

  • Almost regular
  • **
  • Posts: 187
  • nanyu
Re: rev 7569 add wxLB_MULTIPLE feature, but some one is complaining
« Reply #10 on: July 10, 2012, 12:04:25 pm »
thanks!