Recent

Author Topic: Linux Grid Metrics  (Read 4305 times)

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Linux Grid Metrics
« on: April 02, 2011, 11:55:24 pm »
A few related questions.

I need double-click on a grid header and to know coords of header cell [0, 0], [1, 0] ... but StringGrid1DblClick(Sender: TObject); gives only Sender.
Grids have public functions MouseTocell but it requires mouse coords related to grid (where [0,0] is top left corner) and I have only mouse.CursorPos .
Is there any standart way ? (maybe I can do it using OnMouseUp)

And is there linux equivalent for windows.GetSystemMetrics ?
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

circular

  • Hero Member
  • *****
  • Posts: 4397
    • Personal webpage
Re: Linux Grid Metrics
« Reply #1 on: April 03, 2011, 12:43:11 am »
You can handle the MouseMove event and store at this moment where the mouse is.
Conscience is the debugger of the mind

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Linux Grid Metrics
« Reply #2 on: April 03, 2011, 12:55:17 am »
Thanks.

Finally I will use StringGrid1HeaderClick(Sender: TObject; IsColumn: Boolean;  Index: Integer);
I will store IsColumn and Index to some global variable and reuse them on DoubleClick, so it is not so much unefficient.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

 

TinyPortal © 2005-2018