Results 1 to 5 of 5

Thread: Change MenuItem Text [Resolved]

Threaded View

  1. #1

    Thread Starter
    Addicted Member Peter1's Avatar
    Join Date
    Aug 2002
    Posts
    166

    Change MenuItem Text [Resolved]

    VB Code:
    1. [color="#0000A0"]Private[/color] [color="#0000A0"]Sub[/color] mnuHidePop_Click([color="#0000A0"]ByVal[/color] sender [color="#0000A0"]As[/color] System.Object, [color="#0000A0"]ByVal[/color] e [color="#0000A0"]As[/color] System.EventArgs) Handles mnuHidePop.Click
    2.         [color="#0000A0"]If[/color] mnuHide.Text = "&Hide" [color="#0000A0"]Then[/color]
    3.             Me.WindowState = FormWindowState.Minimized
    4.             mnuHide.Text = "&Show"
    5.         [color="#0000A0"]ElseIf[/color] mnuHide.Text = "&Show" [color="#0000A0"]Then[/color]
    6.             Me.WindowState = FormWindowState.Normal
    7.             mnuHide.Text = "&Hide"
    8.         [color="#0000A0"]End[/color] [color="#0000A0"]If[/color]
    9.     [color="#0000A0"]End[/color] [color="#0000A0"]Sub[/color]

    Hello.

    I am trying to edit the name of a menu item when I click it. At the moment I am using the code above. With this code the text changes (When i go through it line by line), but it doesn't actually display the changes.

    Anyone know the reason why?

    Many thanks

    Pete
    Last edited by Peter1; Aug 28th, 2003 at 11:46 AM.

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