Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enable & Disable Icons on Toolbar.

Status
Not open for further replies.

1x2z3

Programmer
Sep 18, 2003
39
ZA
When a certian button is selected on a Toolbar like for instance "Add", some of the other icons on the toolbar must be disable till a other Icon is selected that will Enable it.

Current code is :

Private Sub Toolbar1_ButtonClick(ByVal Button MSComctlLib.Button)

Select Case Button.Key

Case is = "Add"
Case is = "Save"
Case is = "Delete"
Case is = "Cancel"
Case is = "Exit"

End Selected

End Sub
 
To disable a toolbar button use the following,

Code:
Toolbar1.Buttons(1).Enabled = False

The index value (1) identifies the specific button. The button index is 1 based so the first button is number 1. Separator buttons are included in the indexes.

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top