This method is to change the number of buttons in the tool.
Syntax
int Grow(
int size,
int flag=0
) ;
Parameters
size
Number of buttons in the list.
flag
Flag for the all the new buttons. If this value is omitted the tool's flag is used.
Return value
This method returns 0 is an allocation error occurred, 1 if no error occurred.
Remarks
Selects.Grow can be used to grow or shrink the number of elements in the tool.
Requirements
Header:
TomoVision_Util.hpp
TomoVision_Tools.hpp
Library:
TomoVision_Util.lib
TomoVision_Tools.lib
Example
|
static Selects demo ;
extern "C" __declspec(dllexport) int Ctrl_Resize( HWND wnd, int width, int height )
{
short i, p_x, p_y, d_x, d_y ;
...
demo.Pos_X = p_x ;
demo.Pos_Y = p_y ;
demo.Dim_X = d_x ;
demo.Dim_Y = d_y ;
demo.border = Border_Dim ;
demo.Arrow_Size = d_y - 2*Space_Dim - 2 ;
demo.Font_Name = Tools_Font_Name ;
demo.Font_Weight = Tools_Font_Weigth ;
demo.Font_Scale = Tools_Font_Scale ;
// --- now create the buttons for this list ---
demo.Grow( nb_but ) ;
for ( i=0; i < nb_but; i++ )
demo.Item[i]->Set_Name( "but %d", i+1 ) ;
demo.Init( wnd ) ;
...
return( 1 ) ;
}
|
|
See also