|
-
May 19th, 2004, 10:31 AM
#1
Thread Starter
Member
toolbar problem [ RESOLVED ]
hi,
i have added a toolbar on my form, also i added buttons in the toolbar. how will i determine which button the user clicks?
the only event it will go wen i double click on the toolbar button is the toolbar_click event. it does not have any event for the specify toolbar button. how can i solve this one?
thanks in advance...
Last edited by Mark_V; May 20th, 2004 at 02:37 AM.
Mark_V
-
May 19th, 2004, 06:32 PM
#2
Sleep mode
I typed this off memory so don't blame me if I'm wrong , It should be like this
VB Code:
select case e.index
case 0 'button 1
.
.
case 1'button 2
.
.
end select
-
May 19th, 2004, 11:32 PM
#3
I believe its actually e.Button to access the button that was clicked but its the same concept as what Pirate was saying.
-
May 20th, 2004, 12:01 AM
#4
Sleep mode
This is how it should be done , 
VB Code:
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs)
Handles ToolBar1.ButtonClick
Select Case e.Button.Text
Case "OK"
Case "Save"
Case "Exit"
End Select
End Sub
-
May 20th, 2004, 02:23 AM
#5
Thread Starter
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|