Angle UI element

Angle <name> [caption] [color:<color>] [degrees:<float>] [bitmap:<bitmap>] [diameter:<float>] [StartDegrees:<integer>] [StartRadians:<integer>] [dir:<#cw|#ccw>] [range:<point3>]

Properties

<Angle>.color color default:(color 0 0 255)

Angle fill in color. Setting the color turns off the Bitmap fill.

<Angle>.bitmap Bitmap default:undefined

Angle fill in Bitmap. Setting the Bitmap turns off the color fill.

<Angle>.diameter Integer default:64

The full diameter of the control, .width and .height are synonymous to this.

<Angle>.degrees Float default:0.0

Current angle in degrees.

<Angle>.radians Float default:0.0

Current angle in radians.

<Angle>.StartDegrees

<Angle>.StartRadians

<Angle>.dir

<Angle>.range

Events

on <Angle> changed <arg> do <expr>

Called when the angle is being changed. <arg> is the current degrees value.

The Angle UI element:

Example:

rollout test "Angle Test"

(

Angle ang1 "Angle 1" diameter:50 align:#left range:[-180,180,45] startdegrees:0 dir:#cw color:red across:3

Angle ang2 "Angle 2" diameter:50 align:#center range:[0,270,90] startdegrees:90 dir:#ccw color:green

Angle ang3 "Angle 3" diameter:50 align:#right range:[0,360,120] startdegrees:270 dir:#cw color:blue

spinner val1 fieldwidth:40 align:#left across:3 range:[-180,180,45]

spinner val2 fieldwidth:40 align:#center range:[0,270,90]

spinner val3 fieldwidth:40 align:#right range:[0,360,120]

on ang1 changed val do val1.value = val

on ang2 changed val do val2.value = val

on ang3 changed val do val3.value = val

on val1 changed val do ang1.degrees = val

on val2 changed val do ang2.degrees= val

on val3 changed val do ang3.degrees= val

)

createdialog test 200 110

 

ms_angle_test.gif

See also

Rollout User-Interface Controls

Rollout User-Interface Controls Types

Rollout User-Interface Controls Common Layout Parameters

Rollout User-Interface Controls Common Properties