Getting and Setting Toolbar Button Information

A toolbar can be changed by changing the buttons that make up that toolbar. LEADTOOLS provides several functions for getting and setting information about toolbar buttons.

General information about toolbar buttons can be accessed through an LBUTTONINFO structure, including button identifier, the state of the button, the bitmap used to display the button, the tool tip text displayed when the user places the mouse over the button and user-defined information included about the button. To get the current information on a specific button, call LToolbar::GetButtonInfo. To alter the information about a specific button use the LToolbar::SetButtonInfo funtion.

Only one button can be selected or checked at a time. The selected button is the active button of the toolbar. To determine the current selected button of a toolbar, call LToolbar::GetButtonChecked. To set a different button as the selected button use LToolbar::SetButtonChecked.

In order to be selected, a toolbar button must be enabled. To determine if a specific button is enabled, call LToolbar::IsButtonEnabled. To enable or disable a button, use LToolbar::SetButtonEnabled.

Toolbar buttons may be visible or hidden. The visibility of a button may be changed using LToolbar::SetButtonVisible. To determine a button's current visibility status call LToolbar::IsButtonVisible.

In addition, buttons can be added or removed from a toolbar using LToolbar::AddButton and LToolbar::RemoveButton.

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++ Class Library Help

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