Next version.
Support for dragging GRID column headers has been added.
Due to the ON HEADCLICK event handler, dragging is possible with the right mouse button only.
Within the same Grid, dragging the header changes the order of the columns.
Dragging a column header from GRID Form_1 to Grid Form_2 or Form_3 adds a new column.
By the way, I found a bug in the operation of the AddColumnEx method.
If we add a new column between existing ones, after inserting the column, the neighbor column's caption also changes.
You can test this eg in \SAMPLES\Controls\Grid\GRID_40 changing in file demo.prg line No. 108 from
Code: Select all
@ 250, 55 BUTTON Button_1 CAPTION "AddCol" ACTION Form_1.Grid_1.AddColumnEx (Nil, "Col"+alltrim(str(++n)), 100, NIL, {'TEXTBOX','NUMERIC','$ 999,999'})
to
Code: Select all
@ 250, 55 BUTTON Button_1 CAPTION "AddCol" ACTION Form_1.Grid_1.AddColumnEx (2, "Col"+alltrim(str(++n)), 100, NIL, {'TEXTBOX','NUMERIC','$ 999,999'})
Dragging GRID columns is possible only within currently visible columns and only from GRID, in which Items are.
In addition, the problem with ScrollBar in GRID was revealed. By moving the mouse pointer to ScrollBar the handle does not change, and the program "Sees" as if it was still on GRID, moving the slider horizontally may result in a drag effect.
I'm really sorry for the imperfections of my DragAndDrop.
Certainly better results could be obtained using the C language, but this is beyond my reach.