L_TBSetButtonVisible

#include "LtTLB.h"

L_LTTLB_API L_INT L_TBSetButtonVisible(pToolbar, uButtonID, fVisible )

Sets the specified button to be visible or hidden.

Parameters

pTOOLBARHANDLE pToolbar

Pointer to a toolbar handle.

L_UINT uButtonID

Identifier of the button to set.

L_BOOL fVisible

Flag that indicates whether to make the specified button visible or hidden. Possible values are:

Value Meaning
TRUE Make the specified button visible.
FALSE Make the specified button hidden.

Returns

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

Comments

To determine whether a button is visible or hidden, call L_TBIsButtonVisible.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT TBSetButtonVisibleExample( pTOOLBARHANDLE pLeadToolbar,L_UINT uButtonID ) 
{ 
   L_INT nRet; 
   nRet = L_TBIsValid ( pLeadToolbar ); 
   /* check the validity of the toolbar handle */ 
   if (SUCCESS == nRet ) 
   { 
      L_BOOL fVisible ; 
 
      /* Get the state of the toolbar button visibility */ 
     nRet = L_TBIsButtonVisible ( pLeadToolbar, uButtonID, &fVisible ) ; 
     if(nRet != SUCCESS) 
        return nRet; 
 
      if ( fVisible ) 
      { 
         nRet = L_TBSetButtonVisible ( pLeadToolbar, uButtonID, FALSE ) ; /* Hid the button */ 
         if(nRet != SUCCESS) 
            return nRet; 
      } 
      else 
      { 
         nRet = L_TBSetButtonVisible ( pLeadToolbar, uButtonID, TRUE ) ; /* Show the button */ 
         if(nRet != SUCCESS) 
            return nRet; 
      } 
 
      return SUCCESS ; 
   } 
   else 
      return nRet ; 
} 
Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Toolbar C API Help