pbSizeToClientArea - DfBaseWindow

Determines if the object's size is based on the outer window bounding area or the client size area

Type: Property

Access: Read/Write

Data Type: Boolean

Parameters: None

Syntax
 Property Boolean pbSizeToClientArea

Read Access: Get pbSizeToClientArea to BooleanVariable
Write Access: Set pbSizeToClientArea to BooleanVariable/Value


Description

pbSizeToClientArea determines if the object should use window bounding (outer, non-client) area or client area metrics. This determines how the Size, GuiSize, piMinSize and piMaxSize properties operate. When false, all sizing is applied to the outer non-client area. When true, all sizing is applied to the client area.

The default for this property is True for MdiDialog and its subclasses (View, dbView), FloatingPanel and its subclasses (ToolPanel, ModalPanel, dbModalPanel), Dialog and BasicPanel (but not for the subclasses AppPanel and Panel). These are the classes that work best with client area sizing allowing maximum portability across platforms and visual styles. These are the "main dialog" classes. Their actual outer size relative to other dialog objects usually does not matter, while the size of their client-area is important because it determines how well child objects fit within the dialog. These are the objects where the size of caption bars and borders may change dramatically across platforms and visual styles. Using client size insures that the client area never changes and the visual relationship between the child objects remain as designed.

The default for all other container classes (Container3d, Group, Panel, etc.) is False. These are the classes that work best with outer window sizing. These containers are located within main-dialogs and they are sized and located based on their appearance relative to their sibling objects. You want to use outer sizing metrics for this.

Of Note

This property should rarely be changed. Using client area sizing on main-dialog objects allows you to design views and panels that can be ported across different platforms and visual styles, without change. In addition, this allows you to design in one platform (e.g., Windows XP) and deploy on another platform (e.g., Windows Vista).

pbSizeToClientArea was added in Dataflex 2008 (14.0). Prior to this revision all sizing was based on the outer window area. Setting this property to false, makes the objects behave as they did prior to this release. When older workspaces (prior to revision 14.0) are migrated to a newer revision the migration utility will adjust your code to use the new client area sizing metrics.

Depending on the pbSizeToClientArea's value, the value of Size and GuiSize will represent either the outer or client area of the window object. The functions GuiWindowSize and GuiClientSize can be used to get these values independent of pbSizeToClientArea. The functions GuiToDialog and DialogToGui can be used to convert between Gui and Dialog units. You use these methods when you are programatically setting the size and location of child objects.

pbSizeToClientArea is set to false in AppPanel and Panel because these are MDI panels and they use their own logic for sizing themselves and their child objects.

See Also

Size | GuiSize | piMinSize | piMaxSize | GuiWindowSize | GuiClientSize | DialogToGui | GuiToDialog