L_TBSetRows

#include "LtTLB.h"

L_INT EXT_FUNCTION L_TBSetRows(pToolbar, nRows )

pTOOLBARHANDLE pToolbar;

/* pointer to a toolbar handle */

L_INT nRows;

/* number of rows */

Sets the number of rows of buttons in the toolbar.

Parameter

Description

pToolbar

Pointer to a toolbar handle.

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

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

LTTLB

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_TBGetRows.

Topics:

Getting and Setting Toolbar Characterisitcs

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 SetToolbarRows ( pTOOLBARHANDLE pLeadToolbar )
{
   if (SUCCESS == L_TBIsValid ( pLeadToolbar ) ) /* check the validity of the toolbar handle */
   {
      L_INT nRow ;

      /* Get the number of rows in the toolbar */
     L_TBGetRows ( pLeadToolbar, &nRow ) ;

      if ( nRow != 2 )
      {
         /* Set the number of rows to 2 */
         L_TBSetRows ( pLeadToolbar, 2 ) ;
      }

      return SUCCESS ;
   }
   else
   {
      return FAILURE ;
   }