Results 1 to 7 of 7

Thread: Toggle Visibility on button causes Move panel on same button to move it multiple times

  1. #1
    Newbie Level
    Join Date
    Apr 2012
    Location
    york, pa
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts


    Toggle Visibility on button causes Move panel on same button to move it multiple times

    Sounds confusing, I know! I have a button that toggles visibility onClick (show/hide working great). This button also moves two other dynamic panels onClick as well. The problem is when I click the toggle to show/hide, each time I do that it continues to move my panels further down the page. How do I set it to only move once?

  2. #2
    Axure Employee
    Join Date
    Jul 2011
    Location
    San Diego, CA
    Posts
    1,258
    Thanks
    198
    Thanked 207 Times in 156 Posts


    My Twitter
    Hi grace - You can add two cases and use the condition "If visibility of panel equals true/false".

    Case 1 - If visibility of panel equals false, move panel, toggle panel.
    Case 2 - Else if, toggle panel.

    Let me know how this goes for you.

  3. #3
    Axure Developer
    Join Date
    Feb 2012
    Location
    San Diego, CA
    Posts
    591
    Thanks
    39
    Thanked 148 Times in 129 Posts


    Hi gracelinedesign,

    Just wanted to give you another option. Paul's way will work if you have a panel that just remains visible after the first click, but it sounds like you might be toggling it back and forth.

    Create a GlobalVariable, "hasBeenClicked".
    Then add one case to move the other dynamic panels. Set a condition on this case of 'If value of variable hasBeenClicked does not equal "true"'.
    Add another case that sets the value of variable "hasBeenClicked" to true.

    This way the first time your condition will be true and the panels will move, after this though "hasBeenClicked" will equal true and the panels won't move.

  4. #4
    Newbie Level
    Join Date
    Apr 2012
    Location
    york, pa
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts


    Thanks so much for the quick response. I do apologize, I am an Axure newbie and never created variables so I'm a little lost. Ian, what I tried was this.... From the main menu I went to Manage Variables and created 'hasBeenClicked'. I kind of thought this had to be defined, but I didn't see a place to define variables (other than in the case panel). I then put a case on my toggle button set to move the panel. Then within that same case I tried to create the variables you mentioned above. But my non logical mind didn't understand how that would work. Screenshot attached. What part am I missing?
    Attached Images Attached Images

  5. #5
    Axure Developer
    Join Date
    Feb 2012
    Location
    San Diego, CA
    Posts
    591
    Thanks
    39
    Thanked 148 Times in 129 Posts


    Hi gracelinedesign,

    Haha, no worries. Can you post the file or you can send it to support at axure dot com and I can check it out and fix it up for you.

  6. #6
    Axure Developer
    Join Date
    Feb 2012
    Location
    San Diego, CA
    Posts
    591
    Thanks
    39
    Thanked 148 Times in 129 Posts


    Hi gracelinedesign,

    I just sent your file back. Let me know if you get everything working fine!

  7. #7
    Axure Employee
    Join Date
    Jul 2011
    Location
    San Diego, CA
    Posts
    1,258
    Thanks
    198
    Thanked 207 Times in 156 Posts


    My Twitter
    Hi Roxanne - I got your email response, I think the variables and multiple cases might be a bit complicated at this point in your Axure training. I made an example for you to look at I've simplified what you're doing here down to one case.

    Case 1
    Toggle Visiblity for 'togglepanel'
    Move 'movepanel' to (700,100)

    This way, when you continue to click, you've already moved to your coordinates, and the panel will continue to toggle.
    Attached Files Attached Files

Similar Threads

  1. How to create a toggle button/button group?
    By 'Roon in forum General Discussion
    Replies: 7
    Last Post: 10-25-2012, 11:00 AM
  2. Replies: 2
    Last Post: 02-24-2012, 02:44 PM
  3. Can I toggle widgets' visibility?
    By martink in forum General Discussion
    Replies: 3
    Last Post: 11-07-2011, 10:07 AM
  4. Replies: 5
    Last Post: 11-01-2011, 10:05 AM
  5. Replies: 0
    Last Post: 10-13-2011, 10:04 AM

Search Engine Friendly URLs by vBSEO 3.6.0 PL2