Recent

Author Topic: (SOLVED) Example of TsWorksheetGrid drag and drop cell  (Read 1870 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
(SOLVED) Example of TsWorksheetGrid drag and drop cell
« on: May 12, 2017, 08:12:55 am »
Hi guys, can anyone tell me a simple example to use the drag and drop of the component mentioned in the title to move the content from a cell A to a cell B?

Thank you
« Last Edit: May 28, 2017, 03:45:00 pm by xinyiman »
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Example of TsWorksheetGrid drag and drop cell
« Reply #1 on: May 28, 2017, 02:00:15 pm »
Sorry to keep you waiting. r5907, finally, contains an initial implemenation of drag and drop for the WorksheetGrid. Like in Excel, move the mouse to the border of the thick selection rectangle and drag it to the requested position. During dragging the destination position is highlighted. Holding CTRL down while the mouse button is released creates a copy of the cells, otherwise the source cells are deleted ("Move"). Although only the thick selection rectangle is shown during dragging, the process also takes care of all selected cells even if they are not contained within the highlighted rectangle (multi-select of non-contiguous cells).

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Example of TsWorksheetGrid drag and drop cell
« Reply #2 on: May 28, 2017, 03:44:46 pm »
thank you  :)
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018