Sound Mill - User's Guide
Visual Attributes Editor
Overview
The Visual Attributes Editor allows you to edit and save the visual presentation Attributes of a control. A control can be a Text Label, Text Box, Button, etc. Attributes not applicable to a control will not appear in the Editor. Figure 1 shows most possible attributes exposed for edit.
Visual Attributes
-
Name - The Name of the control. It may be used in selection lists. Not always editable.
-
Text - Text string associated with a control (ex. Text rendered on a button). Not always editable.
-
Anchor - Used to attach a control to one of the borders of its containing panel or table cell. Unlike Dock, this will not change the size of the control. None value will place the control in the center of its container. Set Dock to None when using the Anchor attribute.
Anchor: Left, None, Right
-
Auto Size - When true, the control size will be automatically determined usually based on Font size, padding and text length. When false, the specified Size is used.
-
Border - Specifies the type of Border (aka outline) for the control.
Border: FixedSingle
-
Background Image - Allows you to set a background image filename to be displayed on a control. The Delete button removes the image filename. Most common image formats are accepted (jpg, png, bmp, more...).
Background Image: Graphite button blank, Layout: Stretch
-
Background Image Layout - Sets how the image is aligned, stretched or replicated on a control.
Values:
Tile replicates the image as necessary to fill the control.
Stretch either stretches or shrinks the image to fill the control but does not maintain the image aspect ratio.
Center will center the image within the control.
Zoom enlarges (or shrinks) the image to the size of the control but maintains the image aspect ratio.
None, the image is top-left aligned within the the control.
-
Colors - A Color Group of foreground / background colors for the control. In Figure 1, a cross hatch background will show through the sample when Opacity is set to less than full Opacity (255). You can create custom color group or use a pre-created Favorite color. The Favorite Color button (yellow star) let's you quickly apply one of your favorite Color Groups. Also see Transparent Background below.
Color Group: White Foreground on Blue Background
-
Dock - Used to attach a control to one of the borders of its containing panel or table cell. The control expands to fill the border dimension of the containing structure overriding the specified Size and Anchor attributes. Fill value will expand the control in size to fit the container.
Dock: Top, Bottom, Left, Right, Fill
-
Font - Font used to render the text of a control. If blank, a Windows default font is used. You can select any font available on your Windows system. The Favorite font button (yellow star) let's you quickly apply a pre-selected Favorite font.
-
Image - An image to be displayed on a control. This is sometimes an icon to be displayed next to the control's text. Or it can be the only visual item on the control. Most common image formats are accepted (jpg, png, bmp, more...).
Custom Button example: Text="Lion", Image="Lion.png", BackgroundImage="BlackGraphiteButtonBlank.png"
-
Image Alignment - Sets how the image is aligned within the control's text. This is useful when you are displaying an image next to text. (also see Text Alignment)
Image Alignment: Middle Left
-
Image Size Mode - Sets how the image is applied to the control. (see Background Image Layout values for explanation)
-
Padding - Spacing added to the control. It is typically used to fine tune alignment of text within the control. When the control is Auto sized, it will add to the size of the control. The Set All button will set all four pad values to one specified value.
No Padding: {Left=0,Top=0,Right=0,Bottom=0}
Padding: {Left=8,Top=4,Right=32,Bottom=16}
-
Size - A specific size in pixels ({Width, Height}) for the control. Text or images may be cut off if the size is not large enough. When Auto-Size is true, it will override this Size attribute.
-
Style - Sets the Windows style for a control. You can mouse over and click the sample button to see subtle differences in the styling.
-
Text Alignment - Sets how the text is aligned within the control. This is useful when you are displaying an image next to text. (also see Image Alignment)
Text Alignment: Middle Center
-
Transparent Background - When true, the background color of a control will be totally Transparent. Any background color defined with the Colors attribute is ignored. This provides a convenient way to apply or ignore a control's background without having to use the Color Group Editor to change the Opacity value.
In the Windows Font dialog, there is a Size Listbox selector with standard sizes (usually up to size 72). If you need a larger size, type the size number into the Size textbox above the Size Listbox selector.