Results 1 to 4 of 4

Thread: VB.NET Toolbar

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    VB.NET Toolbar

    How Toolbar works in VB.NET? I have add a Toolbar1 in a Form and I add 3 buttons.
    This code work:

    Select Case e.Buttons.Text

    But how about if the button has no Text? Is there a possible way to solve this?

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    VB Code:
    1. Private Sub ToolBar1_ButtonClick(ByVal sender As _
    2.  System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
    3.         Select Case ToolBar1.Buttons.IndexOf(e.Button)
    4.             Case 0
    5.                 MyWeb.GoBack()  ' First button
    6.             Case 1
    7.                 MyWeb.GoForward()  'Second button
    8.             Case 2
    9.         End Select
    10.     End Sub
    that's all.

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You can also assign a text value to the tag property and use that.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    didn't know that before, so thanx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width