LToolbar::SetButtonVisible

Summary

Sets the visibility state of the specified button in a toolbar.

Syntax

#include "ltwrappr.h"

L_INT LToolbar::SetButtonVisible (uButtonID, bVisible )

Parameters

L_UINT uButtonID

Identifier of the button to set its visibility.

L_BOOL bVisible

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

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 LToolbar::IsButtonVisible.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT LToolbar__SetButtonVisibleExample(L_UINT uButtonID, LToolbar* tlb) 
 
{ 
   L_INT nRet; 
 
   if ( tlb->IsValid () ) /* check the validity of the toolbar handle */ 
 
   { 
 
      L_BOOL fVisible ; 
 
      /* Get the state of the toolbar button visibility */ 
 
       fVisible = tlb->IsButtonVisible (uButtonID) ; 
 
      if ( fVisible )  
 
      { 
 
         /* Hid the button */ 
 
         nRet = tlb->SetButtonVisible (uButtonID, FALSE ) ; 
         if(nRet != SUCCESS) 
            return nRet; 
 
      } 
 
      else 
 
      { 
 
         /* Show the button */ 
 
         nRet = tlb->SetButtonVisible (uButtonID, TRUE ) ; 
         if(nRet != SUCCESS) 
            return nRet; 
 
      } 
 
   } 
 
   else 
 
   { 
 
      return FAILURE ; 
 
   } 
 
   return SUCCESS ; 
 
} 
Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Toolbar C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.