TAdvGridHeaderPopupList

I created a new application, dropped a TAdvStringGrid and TAdvGridHeaderPopupList on the form and copied the following code from the Developer's Guide into the form's OnCreate event.  The guide says that right-clicking the grid headers will activate the popup.  It does not.  Is there another setting that I am missing?


Delphi 7 
TMS Grid Pack 6.2.8.0

var
i: integer;
begin
AdvGridHeaderPopupList1.Grid := AdvStringGrid1;
AdvGridHeaderPopupList1.Caption := 'Grid columns';
AdvStringGrid1.ColCount := 7;
AdvStringGrid1.LinearFill(False);
for i := 1 to AdvStringGrid1.ColCount - 1 do
begin
AdvStringGrid1.Cells[i,0] := 'Column ' + inttostr(i);
end;
AdvStringGrid1.SetColumnOrder;
AdvStringGrid1.DragDropSettings.OleDropSource := true;
AdvStringGrid1.DragDropSettings.OleDropTarget := true;
AdvStringGrid1.DragDropSettings.OleColumnDragDrop := true; AdvStringGrid1.DragDropSettings.OleColumnsOnly := true; AdvStringGrid1.DragDropSettings.OleColumnReorder := true; 
AdvStringGrid1.EnhRowColMove := false;
AdvGridHeaderPopupList1.MoveFromGridToList(6);
AdvGridHeaderPopupList1.MoveFromGridToList(5);
end;

Delphi XE7 not Delphi 7.

Not sure where you read that the AdvGridHeaderPopupList will show automatically when the header is right-clicked. The AdvGridHeaderPopupList  is shown by calling AdvGridHeaderPopupList.Show().

Also, setting properties under grid.DragDropSettings is not necessary as AdvGridHeaderPopupList is doing all this for you.

All that needs to be done is:

  AdvGridHeaderPopupList1.Grid := AdvStringGrid;
  AdvGridHeaderPopupList1.Show(self);

Thank you.


Page 179.

Example:
Following code snippet shows the setup of a TAdvStringGrid with 6 normal columns of which the last two columns are initially hidden and available in the TAdvGridHeaderPopupList. The list is shown when the header of the grid is right-clicked. From there the user can drag the 2 columns 5 and 6 from the list to the grid or drag columns from the grid to the list.

Sorry, this is a mistake in the doc. The grid does not do this automatically (it can't actually). You can easily show the TAdvGridHeaderPopupList by calling TAdvGridHeaderPopupList.Show from grid.OnRightClickCell when a fixed header cell is right-clicked.