TdxTabbedMDIManager.ViewInfo Property
Provides access to ViewInfo information about the tabbed control that arranges MDI child forms within the tabbed MDI manager.
Declaration
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.
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