= ctl =
== Syntax == :int ctl(int id) == Arguments == :id ::A numeric identifier for a control. == Return == :The current value of the control specified. Max range: from -9999999 (7 digits) to +99999999 (8 digits). == Description == :Returns the current value of the user control specified by the id argument. There are max. 250 ctl's possible: ctl(0) through ctl(249). == Example 1 == <code> %ffp ctl(0): STANDARD OnFilterStart: {Info("The value of control 0 is %d", ctl(0)); return false; }</code> == Example 2 == :With additional features <code> ctl( 2): "CTL_02 ", // name size =( 160, 6), // dimension slider pos =( 340, 200), // position into dialog editsize =( 40, 9), // *dimension display window theme =on, // *new layout, you can switch it off by: theme =off Color =RGB( 76, 89, 102), // color slider FontColor =RGB( 184, 200, 217), // color name range =( -800, 800), // range divisor =40, // value will show up devised by set value, display only! line =10, // jump value only when using left/right tabs val =0 // default value, must fall within range, // otherwise nearest value will be set // *new from (1.0 Beta 9.1) Feb 2009 on </code> == To make a useful step output == :The value of the slider must be further worked out, since it only affects the display window: .::1. Configure the slider as above. ::2. Convert internally the ctl( n) to a float or double: ::float CTn =ctl( n); ::3. The same variable can be immediately overwritten by: ::CTn =round( CTn /10.0) /4.0; .:This gives a clean step output, in this case with exact increments of 0.25, :whatever the user sets. |