L_TBSetRows

#include "LtTLB.h"

L_LTTLB_API L_INT L_TBSetRows(pToolbar, nRows )

Sets the number of rows of buttons in the toolbar.

Parameters

pTOOLBARHANDLE pToolbar

Pointer to a toolbar handle.

L_INT nRows

Number of rows requested. The minimum number of rows is one, and the maximum number of rows is equal to the number of buttons in the toolbar.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes

Comments

Buttons are arranged on the rows from left to right.

To determine the current number of rows set, call L_TBGetRows.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example gets the current number of rows in the toolbar. If it is not 2, then it will make 2 rows.

L_INT TBSetRowsExample( pTOOLBARHANDLE pLeadToolbar ) 
{ 
   L_INT nRet; 
 
   nRet= L_TBIsValid ( pLeadToolbar ); 
   if (SUCCESS == nRet ) /* check the validity of the toolbar handle */ 
   { 
      L_INT nRow ; 
 
      /* Get the number of rows in the toolbar */ 
     nRet = L_TBGetRows ( pLeadToolbar, &nRow ) ; 
     if(nRet != SUCCESS) 
        return nRet; 
 
      if ( nRow != 2 ) 
      { 
         nRet = L_TBSetRows ( pLeadToolbar, 2 ) ; /* Set the number of rows to 2 */ 
         if(nRet != SUCCESS) 
            return nRet; 
      } 
 
      return SUCCESS ; 
   } 
   else 
      return nRet ; 
} 

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Toolbar C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.