piWidth - cWebDynamicObjectContainer

The width of the panel in pixels

Type: Property (Web Property)

Access: Read/Write

Data Type: Integer

Parameters: None

Syntax
 { WebProperty=Client }
 Property Integer piWidth

Web Property Read Access: WebGet piWidth to IntegerVariable
Web Property Write Access: WebSet piWidth to IntegerVariable/Value

Read Access: Get piWidth to IntegerVariable
Write Access: Set piWidth to IntegerVariable/Value


Description

piWidth determines the horizontal size of the panel in pixels, 0 means stretch to available width.

This property has no effect on cWebGroup objects.

If a view's width is fixed, the view and its contents do not change their size or position as you adjust width of the browser. If the browser width is set smaller than the fixed width, the view is clipped. If the browser is width is set larger than the fixed width, you get extra white space. This fixed behavior is set using piWidth to a positive number.

Set piWidth to 400


When piWidth is set to 0, the width is set to the client's width and the view's contents will change size and position based on the width of the actual client. This makes the view responsive.

Set piWidth to 0

Typically, in a responsive application you will want a hybrid behavior where the view should react responsively up to a maximum width. Once that maximum width is reached, the objects within the view should maintain the same width. The piMaxWidth property is used for this. When piMaxWidth is set, you are instructing the browser that the width should adjust responsively only up to a maximum width.

Once the maximum width is reached, the view's width will not change and padding will be added to the right or left hand side of the view. This is controlled at the application level by setting peAlignView.

You should not use piMaxWidth and piWidth in the same view. piMaxWidth is the preferred choice for a responsive application.


About Web Properties
Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.
The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.
See Also

piHeight