Rectangle control

<< Click to Display Table of Contents >>

Manual > Control Reference > Shapes >

Rectangle control


Rectangle control (Rectangle)

 

 

Rectangle control is a control for drawing rectangles.

 
cr_0169

 

hmtoggle_plus0Rotate

Rectangle control can be rotated by binding. The rotation angle is set with Angle. Set the center of rotation with the RotateX/RotateY properties, or move the center handle below with the mouse.

 

cr_0175

 

 

hint

Rotation using the Angle property occurs at runtime, not while editing in Panel Editor.

 

 

hmtoggle_plus0Use as a switch

2D shape controls have a SwitchValue property that switches between ON/OFF when pressed with the mouse.

 

1) When the value changes, the OnSwitchChanged event occurs.

2) You can bind a tag to SwitchValue to set the tag's value to ON (TRUE) or /OFF (FALSE).

3) The SwitchType property determines how the SwitchValue changes when the mouse is pressed. The SwitchType property can be selected from the following five types.

 

SwitchType setting

Switch Type

explanation

A_SWITCH

A-contact switch

While pressed, SwitchValue will be turned ON.

B_SWITCH

B-contact switch

While pressed, turns SwitchValue OFF.

ON_SWITCH

ON switch

When pressed, it turns SwitchValue ON.

OFF_SWITCH

OFF Switch

When pressed, it turns SwitchValue OFF.

ALTERNATE_SWITCH

Alternate Switch

When pressed, it inverts SwitchValue (when OFF it turns it ON, and when ON it turns it OFF).