L_TBSetButtonVisible

#include "LtTLB.h"

L_LTTLB_API L_INT L_TBSetButtonVisible(pToolbar, uButtonID, fVisible )

pTOOLBARHANDLE pToolbar;

pointer to a toolbar handle

L_UINT uButtonID;

button ID

L_BOOL fVisible;

visibility flag

Sets the specified button to be visible or hidden.

Parameter Description
pToolbar Pointer to a toolbar handle.
uButtonID Identifier of the button to set.
fVisible Flag that indicates whether to make the specified button visible or invisible. Possible values are:
  Value Meaning
  TRUE Make the specified button visible.
  FALSE Make the specified button hidden.

Returns

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

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_TBIsButtonVisible.

Topics:

Getting and Setting Toolbar Button Information

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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Toolbar C API Help