Skip to main content
A newer version of this page is available. .
Tab

ASPxPopupControlBase.ScrollBars Property

Gets or sets a value specifying which scrollbars should appear in the control’s window.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.2.dll

Declaration

[DefaultValue(ScrollBars.None)]
public ScrollBars ScrollBars { get; set; }

Property Value

Type Default Description
ScrollBars **None**

One of the ScrollBars enumeration values.

Remarks

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.

Example

At present, ASPxPopupControl does not have the built-in capability to resize nested controls when it's resizing. This example illustrates how to automatically resize controls places inside the popup.

To accomplish this task, execute the following steps:

  1. Set the ScrollBars property to "Auto". This option will allow the popup control to evaluate the content width and height.

  2. Handle the AfterResizing event. In this event handler, call the AdjustControl method for a desired control to force it to reevaluate its size.

  3. 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.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
See Also