GraffitiLayout

Preview #

About #

GraffitiLayout takes the guesswork out of designing static user interfaces for a wider variety of device sizes and scaling factors.

Once setup properly, simply changing the dimensions of your window or container will resize everything within and make it fit to your desired specifications. Its powerful optional features that allow for modifying placement, scaling, and drawing on-the-fly give you what you need to build great UIs.

Enumerations #

NameValues
FontSizingsHeight
Width
Minimum
Maximum
None

Constants #

This class exposes no constants.

Events #

NameParametersReturn TypeDescription
InitializingObjectinstance as GraffitiLayoutObjectBooleanRaised during the initialization process to allow for setting custom properties of the GraffitiLayoutObject. Return False to exclude from Layout resize operations.
ResizedNoneNoneRaised when a resize has completed.
Resizingcontrol as GraffitiLayoutObjectNoneRaised for each object during resize operations.

Methods #

NameParametersReturn TypeDescription
ConstructorNoneNoneInstantiates a new object.
Constructorview as ObjectNoneInstantiates a new object controlling the specified view.
ObjectFromContentscontrol as ObjectGraffitiLayoutObjectSearches controlled GraffitiLayoutObjects for the instance that represents the value of the control parameter.

Properties #

NameTypeDefault ValueDescription
BaseFontSizeInteger12Font size used in resize operations where a control’s font size is returned as the system default of 0.
ConstainProportionsBooleanFalseWhen True, will attempt to resize the view and controls proportional to their initial state.
ConstrainToContentBooleanFalseWhen True, views will be constrained to the maximum size of their contents rather than based on their initial state.
ContentMarginInteger20Margin applied to outside edges of views.
FontSizingFontSizingsFontSizings.HeightDetermines which criteria is used when calculating font sizes. Height will, most often, be the correct choice.
ViewObjectNilThe view controlled by this instance. Once set, cannot be changed. Valid value types are DesktopContainer and DesktopWindow.

Notes #

GraffitiLayoutGraffitiSuite #

Some GraffitiSuite controls require special operations to function properly in a view that is controlled by GraffitiLayout. When using GraffitiSuite controls on a view, the superclass of your GraffitiLayout object should be GraffitiLayoutGraffitiSuite for compatibility.