Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2000
    Location
    PeachState USA
    Posts
    186

    Hide object/Show Object - Same button?

    Is it possible to have one button on click event to show and another click (same button) to hide?...show/hide...show/hide.



    Text1



    Text1


  2. #2
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728

    Re: Hide object/Show Object - Same button?

    What you want is a toggle. Set a variable to true or false each time the button is clicked. (If it's true, set it to false, otherwise set it to true.)

    Like so:

    IF (%foo%)
    // turn it off
    %foo% = 0
    ELSE
    // turn it on
    %foo% = 1
    END IF

    Then, add in the stuff to do the showing and hiding, depending on whether it's being toggled on or off.
    --[[ Indigo Rose Software Developer ]]

Posting Permissions

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