Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxCustomRibbonGalleryItem.ShowGroupItem(TdxRibbonGalleryGroupItem) Method

Makes a specified gallery item visible within a gallery.

#Declaration

Delphi
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