xtrareports-devexpress-dot-xtrareports-dot-userdesigner-dot-xrdesignpanel-522e9a5b.md
Gets or sets the index of the tab currently selected in the Design Panel.
Namespace : DevExpress.XtraReports.UserDesigner
Assembly : DevExpress.XtraReports.v25.2.Extensions.dll
NuGet Package : DevExpress.Win.Reporting
[DefaultValue(0)]
[SRCategory(ReportStringId.CatAppearance)]
public int SelectedTabIndex { get; set; }
<DefaultValue(0)>
<SRCategory(ReportStringId.CatAppearance)>
Public Property SelectedTabIndex As Integer
| Type | Default | Description |
|---|---|---|
| Int32 | 0 |
An integer value which represents the index of the currently selected tab.
|
Use the SelectedTabIndex property, to obtain the active tab, or switch tabs in an XRDesignPanel. By default, the Design Panel’s tabs correspond to the following indexes.
0. Design tab. Displays the report’s design surface.
1. Preview tab. Displays the report’s Print Preview.
2. HTML View tab. Displays the report’s HTML preview.
3. Scripts tab. Used to maintain the report’s scripts.
Note
After modifying the SelectedTabIndex property, the XRDesignPanel.SelectedTabIndexChanged event is raised.
The following code snippets (auto-collected from DevExpress Examples) contain references to the SelectedTabIndex property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-scheduler-print-appointments-using-reports/CS/PrintingViaReports/Form1.cs#L192
designForm.OpenReport(xr);
designForm.DesignPanel.SelectedTabIndex = 1;
designForm.ShowDialog();
reporting-aggregated-function-calculated-field/CS/AggregateFunctionCalcFieldExample/Form1.cs#L18
this.reportDesigner1.OpenReport(new TestReport());
this.reportDesigner1.ActiveDesignPanel.SelectedTabIndex = 1;
}
winforms-scheduler-print-appointments-using-reports/VB/PrintingViaReports/Form1.vb#L173
designForm.OpenReport(xr)
designForm.DesignPanel.SelectedTabIndex = 1
designForm.ShowDialog()
reporting-aggregated-function-calculated-field/VB/AggregateFunctionCalcFieldExample/Form1.vb#L17
Me.reportDesigner1.OpenReport(New TestReport())
Me.reportDesigner1.ActiveDesignPanel.SelectedTabIndex = 1
End Sub
See Also