Skip to main content

TdxCustomRibbonGalleryItem.ShowGroupItem(TdxRibbonGalleryGroupItem) Method

Makes a specified gallery item visible within a gallery.

Declaration

procedure ShowGroupItem(AGroupItem: TdxRibbonGalleryGroupItem);

Parameters

Name Type
AGroupItem TdxRibbonGalleryGroupItem

Remarks

Note

This method is in effect only for in-Ribbon galleries.

AGroupItem specifies the gallery item to be brought into view.

The following code sample demonstrates how to make the last item visible in the first gallery group and determine the index of the first visible row in an in-Ribbon gallery after that operation.

procedure TRibbonDemoMainForm.Button1Click(Sender: TObject);
var
  AGroupItem: TdxRibbonGalleryGroupItem;
  ATopVisibleRowIndex: Integer;
begin
  with dxRibbonGalleryItem1 do
  begin
    // getting the last item in the first gallery group
    AGroupItem := GalleryGroups[0].Items[GalleryGroups[0].Items.Count - 1];
    // making this item visible within the gallery
    ShowGroupItem(AGroupItem);
    // getting the index of the top visible row
    ATopVisibleRowIndex := TdxInRibbonGalleryControlViewInfo(Links[0].Control.ViewInfo).TopVisibleRow;
  end;
end;
See Also