This method fix the size of the cursor. It is used when you want the cursor to be proportional to a value. For example, if you use the slider to scroll a page, you may want the cursor to be proportional to the ration: display text length / actual text length.
Syntax
void Larg_Adjust(
float real,
float max
) ;
Parameters
real
Numerator.
max
Denominator.
Return value
This method does not return a value.
Remarks
This method will change the value of the parameter: Curs_Larg with (real/max) * 0.5 if real < max.
Requirements
Header:
TomoVision_Util.hpp
TomoVision_Tools.hpp
Library:
TomoVision_Util.lib
TomoVision_Tools.lib
Example
|
static Sliders demo_3 ;
extern "C" __declspec(dllexport) int Ctrl_Resize( HWND wnd, int width, int height )
{
short p_x, p_y, d_x, d_y ;
short Border_Dim = (short) Fct_Variable_Value( "$INTERFACE_BORDER_DIM" ) ;
char *Tools_Font_Name = (char *) Fct_Variable_Value( "$INTERFACE_TOOL_FONT_NAME" ) ;
char *Tools_Font_Weigth = (char *) Fct_Variable_Value( "$INTERFACE_TOOL_FONT_WEIGHT" ) ;
short Tools_Font_Scale = (short) Fct_Variable_Value( "$INTERFACE_TOOL_FONT_SCALE" ) ;
...
demo_3.Flag = VALUATOR_LOCK ;
demo_3.Name = "Demo Slider 3" ;
demo_3.Pos_X = p_x ;
demo_3.Pos_Y = p_y ;
demo_3.Dim_X = d_x ;
demo_3.Dim_Y = d_y ;
demo_3.Min_Value = 0 ;
demo_3.Max_Value = 100 ;
demo_3.Inc = 1 ;
demo_3.border = Border_Dim ;
demo_3.Font_Name = Tools_Font_Name ;
demo_3.Font_Weight = Tools_Font_Weigth ;
demo_3.Font_Scale = Tools_Font_Scale ;
demo_3.Larg_Adjust( d_x, d_x + 100 ) ;
demo_3.Init( wnd ) ;
return( 1 ) ;
}
|
|
See also