Welcome to TalkGraphics.com
Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    Jan 2011
    Location
    Geneva, Switzerland
    Posts
    64

    Default Button actions: Show/hide layers???

    Hi,
    I checked the forums to find a way to show or hide layers within a page using a button.
    All I've seen is actually popup layers, would that be the only solution?

    What I try to achieve is a section of the page, a rectangle, displaying 5 different images with associated text depending on which 5 buttons (looking like tabs) have been clicked.

    Each rectangle content is in a specific layer, and only one layer would be shown at a time.

    How do I associate actions to those buttons?
    A click on one button would need to:
    1- hide the current layer and show the one I want
    2- change its own button look so it is marked as "pressed"

    Or should I use a navbar instead, acting like a tab?
    Could the navtab activate/hide layers without moving to another page?

    Thanks for any help.

  2. #2
    Join Date
    Aug 2007
    Location
    Maghull UK
    Posts
    6,202

    Default Re: Button actions: Show/hide layers???

    JOHN -XaReg (FB) XaReg (DB - ignore prompt to register)
    Windows 10 [Anniversary] pro Intel Pentium CPU G630 @ 2.70Ghz RAM: 4 GB; 64-bit x64

  3. #3
    Join Date
    Jan 2011
    Location
    Geneva, Switzerland
    Posts
    64

    Default Re: Button actions: Show/hide layers???

    Thanks, but where do I add this info? In which object?
    I was able to add a navbar as a tab and have each one show one of the layers, but it would be nice to actually be able to correctly manage this.
    If the user click outside of the layers, they disappear.
    When arriving on the page, the default layer is not shown, even though it's not hidden.

  4. #4
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,044

    Default Re: Button actions: Show/hide layers???

    The code below will open layers 1 & 2 and close layers 3 & 4
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	sjordi001.png 
Views:	625 
Size:	20.3 KB 
ID:	86703  
    Attached Files Attached Files
    Last edited by Drwyd; 19 January 2012 at 02:12 PM. Reason: Added sample file

  5. #5
    Join Date
    Jan 2011
    Location
    Geneva, Switzerland
    Posts
    64

    Default Re: Button actions: Show/hide layers???

    Thanks Drwyd,

    This works perfectly and I learned something.

    To improve it, any idea on the following?

    1- Activate the first layer when arriving on the page. Even though the layer is not marked as hidden, it doesn't appear unless I click its tab

    2- Any way to have the navbar tabs actually show the focus (hightlight the currently selected one)?

    Thanks for any help.

  6. #6
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,044

    Default Re: Button actions: Show/hide layers???

    Hi Sjordi

    To highlight the current tab you could put the effect on the popup layer itself.

    For auto popup on load see sample file below.
    Attached Files Attached Files

  7. #7
    Join Date
    May 2017
    Posts
    2

    Default Re: Button actions: Show/hide layers???

    Hi I am new to this forum but interested in your xar file which I have downloaded but I am trying to incorporate this action into my own site but must be missing something as although yours works fine I cannot get it to work could you breakdown actions needed to achieve what you have developed please. Thx Peter

  8. #8

    Default Re: Button actions: Show/hide layers???

    Quote Originally Posted by Drwyd View Post
    The code below will open layers 1 & 2 and close layers 3 & 4
    I know this is an old Thread but this response helped with a problem I'm trying to solve. I'll try my question and will add a new thread if I don't get a response.

    Is there syntax to command "all other layers" to close. So for instance I want 2 or 3 layers to open and name them and all others to close (without actually naming all others specifically).

    So, for instance the Syntax in 'Web Properties' - 'Link to...' - popuppen "layer2","layer3"; close "all other layers syntax?"

 

 

Tags for this Thread

Bookmarks

Posting Permissions

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