Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  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:	624 
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

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

    ]Here is an example of what I think you are trying to achieve.

    [ATTACH]87112[/ATTACH
    Attached Files Attached Files

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

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

    That's exactly what I need.
    So it looks like I won't use a navbar for tab navigation but "fake" tabs instead. Clickable and revelaing/hiding... :-)

  9. #9
    Join Date
    Feb 2012
    Posts
    22

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

    Hello!
    That is what I looking for but with fade effect to show and hide layer. Do you think is it possible ?

    Thanks

    Raff

  10. #10
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,804

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

    I think the attached will do what you need:Xara Horizontal Tab Fade.web.

    No need for popup links, this simply uses layers and fade transitions.

    I did it for four tabs and a base layer so you could discover how to do the fifth.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

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
  •