Results 1 to 3 of 3

Thread: OK Another one

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Posts
    67

    Smile

    Pretend you have the caption "Do This" in a menu.
    If the user opens that menu and clicks on "Do this", an action takes place and "Do this" has a check mark on it.

    When the user goes back and unchecks, The check goes away and the action reverses.

    How do I accomplish this?

    Thank you very much!

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    [code]
    'assuming gggg and jjjjj are sub menues

    Private Sub gggg_Click()
    gggg.Checked = True
    jjjjj.Checked = False
    MsgBox "gggg is Checked"
    End Sub

    Private Sub jjjjj_Click()
    jjjjj.Checked = True
    gggg.Checked = False
    MsgBox "jjjjj is Checked"
    End Sub
    [code]
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Wink Or just do this...

    You can just make the checked property equal to the opposite of the current property value using the NOT operator...
    Code:
    Private Sub mnuViewStatus_Click()
        ' This toggles the check mark each time the user clicks the menu item
        mnuViewStatus.Checked = Not mnuViewStatus.Checked
    End Sub
    ~seaweed

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