WinCheckBox Object Plugin

Description

This WinCheckBox plugin object can be used to replace the original CheckBox object shipped with AutoPlay Media Studio. It doesn't support text color, but instead accepts theming through the Skin action plugin or an external product.

Please note that the WinCheckBox currently is shown as transparent only in runtime, while displaying a solid background color during design in the editor. This cosmetic issue might be solved in a future update.

Properties

Text

The caption to be displayed for the checkbox control.

Checked

Allows you to show a checkbox that show initially as checked on the page.

Left Text

Usually, the checkbox square is shown to the left of the caption text, but checking this option will display the square at the right of the caption.

Multiline

If you need to display several lines of text in the caption of the checkbox, use this option.

Select Font

Clicking this button will display a dialog which allows you to select the font, font style and size. Additionally, you may set the text to be displayed as underline or strikeout.

Other properties may be introduced in future versions of this plugin.

Events

On Click

Fires when the left mouse button is clicked on the control.

On Right-Click

Fires when the right mouse button is clicked on the control.

On Enter

Fires when the mouse enters the window containing the control.

On Leave

Fires when the mouse leaves the window containing the control.

Actions

WinCheckBox.SetChecked(string ObjectName, boolean State);

Description:

Sets the checked/unchecked state of a wincheckbox object.

ObjectName:

(string) The name of the wincheckbox object.

Color:

(boolean) Whether to make the wincheckbox object checked or unchecked

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Set the control as checked WinCheckBox.SetChecked("MyWinCheckBox", true);

WinCheckBox.GetChecked(string ObjectName);

Description:

Returns true if a specific wincheckbox object is checked, or false if it's unchecked.

ObjectName:

(string) The name of the wincheckbox object.

Returns:

True if the wincheckbox object is checked, false if it is unchecked. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Check the state of a wincheckbox state = WinCheckBox.GetChecked("MyWinCheckBox");

WinCheckBox.SetText(string ObjectName, String Caption);

Description:

Sets the text (caption) currently displayed on the wincheckbox object.

ObjectName:

(string) The name of the wincheckbox object.

Caption:

(string) The text to be displayed as caption of the wincheckbox object.

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Set the text of the checkbox WinCheckBox.SetText("MyWinCheckBox", "New Caption");

WinCheckBox.GetText(string ObjectName);

Description:

Returns the text currently displayed on the wincheckbox object.

ObjectName:

(string) The name of the wincheckbox object.

Returns:

(string) The currently caption of the wincheckbox object. If no text is displayed or an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Get the current caption caption = WinCheckBox.GetText("MyWinCheckBox");

WinCheckBox.SetEnabled(string ObjectName, boolean State);

Description:

Sets the enabled/disabled state of a wincheckbox object.

ObjectName:

(string) The name of the wincheckbox object.

State:

(boolean) Whether to make the checkbox object enabled (true) or disabled (false).

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Disable the WinCheckBox WinCheckBox.SetEnable("MyWinCheckBox", false);

WinCheckBox.SetVisible(string ObjectName, boolean State);

Description:

Sets the visibility of a wincheckbox object.

ObjectName:

(string) The name of the wincheckbox object.

State:

(boolean) Whether to make the checkbox object visible (true) or hidden (false).

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Hide the WinCheckBox WinCheckBox.SetVisible("MyWinCheckBox", false);

WinCheckBox.Redraw(string ObjectName);

Description:

Forces a redraw of the window containing the control. This is intended to be used if the background image or color of the page is changed, and the WinCheckBox object has to be redrawn to continue to look "transparent" on the page in runtime.

ObjectName:

(string) The name of the wincheckbox object.

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Redraw the WindCheckBox window holding the control WinCheckBox.Redraw("MyWinCheckBox");

Change Log

1.0.2.0

1.0.1.1

1.0.1.0

Additional Information

Author:

Ulrich Peters
upeters@mindquake.com.br

Copyright:

Plugin is copyright © 2008-2009 MindQuake Serviços de Informática Ltda.

Website:

http://www.mindquake.com.br


Copyright © 2008-2009 MindQuake Serviços de Informática Ltda.
All Rights Reserved.