aspnet-devexpress-dot-web-dot-aspxpopupcontrolbase-14d36186.md
Gets or sets a value specifying which scrollbars should appear in the control’s window.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(ScrollBars.None)]
public ScrollBars ScrollBars { get; set; }
<DefaultValue(ScrollBars.None)>
Public Property ScrollBars As ScrollBars
| Type | Default | Description |
|---|---|---|
| ScrollBars | None |
One of the ScrollBars enumeration values.
|
Use the ScrollBars property, to control the visibility and position of scroll bars in the control’s window.
If you specify Auto for the ScrollBars property, scroll bars are automatically shown when the size of the content in the window exceeds the size of the window itself.
To set the visibility and position of scroll bars for a particular popup window, use the PopupWindow.ScrollBars property.
The ASPxPopupControl does not have the built-in capability to resize nested controls when it is resizing. This example illustrates how to automatically resize controls places inside the popup.
To accomplish this task, execute the following steps:
Set the ScrollBars property to Auto. This option allows the popup control to evaluate the content width and height.
Handle the AfterResizing event. In the event handler, call the AdjustControl method for a desired control to force it to reevaluate its size.
Place the control into the <div style="height: 100%; width: 100%; overflow: hidden"> element. This element is necessary to overcome scrollbars that can be shown when ScrollBars="Auto" is set.
function OnClick(s, e) {
ASPxPopupControl1.Show();
}
function OnAfterResizing() {
splitter.AdjustControl();
}
<dx:ASPxPopupControl ID="ASPxPopupControl1" runat="server" Height="500px" Width="500px"
ScrollBars="Auto" AllowResize="true" LoadContentViaCallback="OnFirstShow">
<ClientSideEvents AfterResizing="OnAfterResizing" />
<ContentCollection>
<dx:PopupControlContentControl ID="PopupControlContentControl2" runat="server" SupportsDisabledAttribute="True">
<div style="height: 100%; width: 100%; overflow: hidden">
<dx:ASPxSplitter ID="ASPxSplitter2" runat="server" Width="100%" Height="100%" ClientInstanceName="splitter">
<Panes>
<dx:SplitterPane>
<ContentCollection>
<dx:SplitterContentControl ID="SplitterContentControl3" runat="server" SupportsDisabledAttribute="True" />
</ContentCollection>
</dx:SplitterPane>
<dx:SplitterPane>
<ContentCollection>
<dx:SplitterContentControl ID="SplitterContentControl4" runat="server" SupportsDisabledAttribute="True" />
</ContentCollection>
</dx:SplitterPane>
</Panes>
</dx:ASPxSplitter>
</div>
</dx:PopupControlContentControl>
</ContentCollection>
</dx:ASPxPopupControl>
<dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" Text="Show PopUp">
<ClientSideEvents Click="OnClick" />
</dx:ASPxButton>
See Also