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

TdxTabbedMDIManager.ViewInfo Property

Provides access to ViewInfo information about the tabbed control that arranges MDI child forms within the tabbed MDI manager.

#Declaration

Delphi
property ViewInfo: TdxTabbedMDITabControlViewInfo read;

#Property Value

Type
TdxTabbedMDITabControlViewInfo

#Remarks

Use the ViewInfo information to access the settings of UI elements displayed in the MDI manager’s tabbed control. For instance, you can use this information when implementing your own drag-and-drop logic.

The following code snippet shows a form’s OnDragOver event handler which uses the ViewInfo information to determine the tabbed page located under the mouse pointer.

Delphi
procedure <Form>.FormDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
var
  APoint: TPoint;
  APageIndex: Integer;
begin
  Accept := False;
  if dxTabbedMDIManager1.Active then
  begin
    APoint := cxPointOffset(Point(X, Y), dxTabbedMDIManager1.ViewInfo.BoundsRect.TopLeft, False);
    APageIndex := dxTabbedMDIManager1.ViewInfo.VisibleIndexOfTabAt(APoint.X, APoint.Y);
    if APageIndex <> -1 then
    begin
      dxTabbedMDIManager1.TabProperties.PageIndex := APageIndex;
      Accept := True;
    end;
  end;
end;

Refer to the solution published at https://supportcenter.devexpress.com/ticket/details/q226932/add-the-capability-to-activate-a-tab-when-dragging-an-object-over-it-during-form-to-form for the complete code example.

See Also