Recent

Author Topic: Ctrl-Click Multiselect in TTreeView, TViretualTreeView and others  (Read 6604 times)

Shebuka

  • Sr. Member
  • ****
  • Posts: 422
Hi all, i'v registered my new account (before i was sharing account with rajivsoft) and have some suggestions for components with Ctrl-Click multi selection.

On Mac OS X, Ctrl-Click is some sort of alias to right mouse click and it's a problem for practically all components (especially in treeview, virtualtreeview and listbox) that enables multi-select and has assigned pop up.

In fact in Finder to multi select separated files (not the block one that you select with shift) you must use Meta key, if you use Ctrl it pop ups Right Click pop up.

The solution is to IFDEF MouseDown event, like for TreeView around 4876 line instead of
Code: Pascal  [Select]
  1.           if (ssCtrl in Shift) then
put
Code: Pascal  [Select]
  1. {$IFDEF DARWIN}
  2.           if (ssMeta in Shift) then
  3. {$ELSE}
  4.           if (ssCtrl in Shift) then
  5. {$ENDIF}

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: Ctrl-Click Multiselect in TTreeView, TViretualTreeView and others
« Reply #1 on: April 19, 2011, 01:35:32 pm »
This thread is very similar to http://www.lazarus.freepascal.org/index.php/topic,12885.0.html

Please create a diff patch which fixes the issue in all mentioned components and attach it to a bug report.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: Ctrl-Click Multiselect in TTreeView, TViretualTreeView and others
« Reply #2 on: April 19, 2011, 01:36:01 pm »
Just in case you need, patch instructions are here: http://wiki.freepascal.org/Creating_A_Patch

Shebuka

  • Sr. Member
  • ****
  • Posts: 422
Re: Ctrl-Click Multiselect in TTreeView, TViretualTreeView and others
« Reply #3 on: April 19, 2011, 02:19:47 pm »
This thread is very similar to http://www.lazarus.freepascal.org/index.php/topic,12885.0.html

Please create a diff patch which fixes the issue in all mentioned components and attach it to a bug report.
I know, but that one thread was more IDE related and i cant fix it because i can't find where is 'searching of function definition' function nor where it's linked to mouse event...

Thanks for link to patching tutorial, will try it ;)