Positioning UIComponent in Panel

hello friends,
i am facing problem while positioning the UIComponent (Line)
in the panel. For the 1st time it works fine. But for the second
time when i tried to positioned it, the y co-ordinates values are
changing. Example: With a fixed coordinate values when i am trying
to draw 5 lines, it is not coming in one line. they are coming in
different coordinates. i point out that every time when the new
line is created, the y coordinates values are increasing by some
amount.so the line is not drawing in exact co ordinates.
Attach Code:
for(var i=o; i<5;i++)
var line:LineSprite = new LineSprite(0,0,100,100, 0x000000,
0xEECCCC);
var uic:UIComponent = new UIComponent();
uic.addChild(line);
globalIndexInPanel++;
model.linkMngr.targetPanel.addChildAt(uic,globalIndexInPanel);
}

Look at the default positioning behavior of the UIComponent.
I don't have time to look it up for you, but it sounds like
automated behavior.

Similar Messages

  • How to maitain size and position of a panel in lookout?

    To my project, i need to show several panels at same time. The user no to be able to rezise or move panel of their position.
    Sombody can help me?
    By the way, i'm using lookout 4.5 build 19

    Unfortunately, there is not a direct way that you can “lock down” the panels to prevent the user from moving them. However, one thing you might want to consider is to use a button that will automatically position the panels where you want them every time the button is pressed. Another thing you could use is a timer that will automatically position the panels where you want them at a specific time interval. Both of these methods involve using the X and Y data members of a Panel.
    However, I would suggest that you submit a product suggestion for the next revision of Lookout to include the feature that you are looking for. Please go to ni.com/contact and then go to the Product Feedback section.
    Russell G.

  • Weird Positioning for Skinned Panel in Flex Builder 3

    In the previous versions of the Flex Builder 3, even for the
    Flex Builder 3 Beta Milestone 4, my custom skinned Panel component
    worked fine. So I have an image skin and then I put into Flex
    Builder, set the 9 slice settings, did some adjustments to the
    headerHeight. And when I add a child component to the Panel
    component, it will automatically be placed beneath the Panel's
    title (like a VBox layout), position it inside the panel.
    But now, compiling with the same files and css in the new
    Flex Builder 3 final release, the Panel does not position the
    children components correctly anymore. The children are still
    positioned in a VBox layout but the first child started from the
    point 0,0 of the Panel. So, the first child is overlapping the
    Panel's title and all the children seems to go out of the Panel a
    bit. This isn't what it used to be(that's to automatically position
    them in the content are of the Panel component or at least within
    the 9 slice middle area).
    A Panel that isn't skinned at all works fine.
    Is there anything I have to change or do to solve this?
    Thanks.

    Looks like what I am having is something close to that except
    that my problem is related to the borderSkin and not the
    borderStyle. But I have seen some of the comments talking about the
    borderSkin problem too.
    What I have done now is I use the Flex 3 public release but
    copied the sdk from the previous beta version and compile with that
    sdk.
    It kind of resolves that panel bug problem(since I am just
    using the old version) but I am sure I will be missing out any new
    features that the new Flex 3 public release has.

  • Locking markers position at markers panel and multiple regions batch processing

    Greetings,
    I have one problem with markers, when I hover mouse over any marker item at Markers panel and unintentionally scroll the wheel in the effort to scroll the whole list, the marker time value is shifted instead. This is extremely unconvenient as the precisely selected region changes it's position, eventually even without letting user to know. Wanted to aski if that adjusting times using wheel (which I found useles beside it) is turnable off so that all markers are imune against any scrolling the wheel over Markers list.
    2nd question - Is it possible to define a batch of for each of marked ranges, ie. set the parameters for each task individually? I need to stretch a long audio track with many regions from whose each uses specific stretch ratio.

    I've never used it, but the Automate to Sequence feature has the option to add clips at the Unnumbered Markers.

  • Bridge not Remembering Last Position for Side Panels?

    The side panels in Bridge CS6 will not stay to the last set position when I close? I have thought that this was a case of bridge not closing properly on Windows (7) shutdown. I then tried setting the side panels to where I would like them and went File > Exit to close bridge properly and when I launch it still does not have the correct position. Does it not remember this and how do I change this?
    Here is a screenshot of what I am calling the side panels: http://screencast.com/t/QDZGNCPp  (The red arrows are pointing to the side panels.)

    If you have start Bridge at launch enabled you closing proceedure should work.
    Have you tried setting your panels where you want then saving this as a workspace?

  • Setting up position of front panel objects using input from file

    I am working on a project and i have got the following query.
    i have a front panel with lot of objects like knobs,dials,push buttons etc..
    the entire panel will be the console to the user and as he changes the various
    positions of the objects their values will be written in to a file.
    now after a days work when the system is restarted again the next day
    the values of various objects should be read from the file and the front panel objects should be set in their position according to it
    in short the objects(knobs,buttons etc) should both act as o/p i.e when user interacts with them and they should also act as i/p when their position will be set from
    file.
    how can i achieve this.any help regard
    ing this would be greatly appreciated

    You should separate the read portion of this vi from the write portion of the vi. You want to execute the read portion of the vi only at startup and the write portion of the vi only at shutdown. So you'll be reading the file and writing the output to the property nodes, running your program, and then taking the value of the controls and writing to file. I have attached an example of how this might work. You might also do this with a state machine structure to control the data flow.
    Hope that helps
    Attachments:
    query.vi ‏49 KB
    read_file.vi ‏42 KB
    write_file.vi ‏36 KB

  • Content Search Web Part with Hover Panel - Problem with positioning with css

    Hi guys!
    I´m having trouble with positioning the hover panel for the Content Search Web Part.
    I used
    this article to help me with luck as far as to the positioning. I´ve tried some inline styling but maybe my knowledge in css is no good enough here.
    Here´s a screenshot from how this looks like. The hover panel generates a gap between the result items, the same height as the hover panel:

    Hi Victoria!
    No the gap comes without any inline css added from me. I´ve tried some inline styling, like z-index and position.
    So, any ideas are welcome.
    Here´s how my Display Template looks like:
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    <head>
    <title>RC Customer Documents</title>
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:ManagedPropertyMapping msdt:dt="string">&#39;Link URL&#39;{Link URL}:&#39;Path&#39;,&#39;Line 1&#39;{Line 1}:&#39;Title&#39;,&#39;Line 2&#39;{Line 2}:&#39;&#39;,&#39;FileExtension&#39;,&#39;SecondaryFileExtension&#39;</mso:ManagedPropertyMapping>
    <mso:MasterPageDescription msdt:dt="string">This Item Display Template will show a preview and properties for Record Center Customer Documents</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#SearchResults;#Content Web Parts;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://d-records.isbank.is/rc/search/_catalogs/masterpage/Display Templates/Content Web Parts/_isb_record_center/tutorial/RC_CustomerDocuments.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
    <mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
    </head>
    <body>
    <!--
    Warning: Do not try to add HTML to this section. Only the contents of the first <div>
    inside the <body> tag will be used while executing Display Template code. Any HTML that
    you add to this section will NOT become part of your Display Template.
    -->
    <script>
    $includeLanguageScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Language Files/{Locale}/CustomStrings.js");
    </script>
    <!--
    Use the div below to author your Display Template. Here are some things to keep in mind:
    * Surround any JavaScript logic as shown below using a "pound underscore" (#_ ... _#) token
    inside a comment.
    * Use the values assigned to your variables using an "underscore pound equals"
    (_#= ... =#_) token.
    -->
    <div id="RC_CustomerDocuments">
    <!--#_
    var id = ctx.ClientControl.get_nextUniqueId();
    var itemId = id + Srch.U.Ids.item;
    var hoverId = id + Srch.U.Ids.hover;
    var hoverUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/_isb_record_center/tutorial/Item_RC_CustomerDocuments_HoverPanel.js";
    $setResultItem(itemId, ctx.CurrentItem);
    ctx.currentItem_ShowHoverPanelCallback = Srch.U.getShowHoverPanelCallback(itemId, hoverId, hoverUrl);
    ctx.currentItem_HideHoverPanelCallback = Srch.U.getHideHoverPanelCallback();
    var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_2lines_");
    var linkURL = $getItemValue(ctx, "Link URL");
    linkURL.overrideValueRenderer($urlHtmlEncode);
    var iconURL = Srch.ContentBySearch.getIconSourceFromItem(ctx.CurrentItem);
    var line1 = $getItemValue(ctx, "Line 1");
    var line2 = $getItemValue(ctx, "Line 2");
    line1.overrideValueRenderer($contentLineText);
    line2.overrideValueRenderer($contentLineText);
    var containerId = encodedId + "container";
    var pictureLinkId = encodedId + "pictureLink";
    var pictureId = encodedId + "picture";
    var dataContainerId = encodedId + "dataContainer";
    var line1LinkId = encodedId + "line1Link";
    var line1Id = encodedId + "line1";
    var line2Id = encodedId + "line2";
    _#-->
    <div class="cbs-Item" name="Item" id="_#= $htmlEncode(itemId) =#_" data-displaytemplate="RC_CustomerDocuments" onmouseover="_#= ctx.currentItem_ShowHoverPanelCallback =#_" onmouseout="_#= ctx.currentItem_HideHoverPanelCallback =#_">
    <div id="wrapper">
    <div id="_#= $htmlEncode(hoverId) =#_" ></div>
    </div>
    <a class="cbs-ItemLink" title="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= pictureLinkId =#_">
    <img class="cbs-Thumbnail" src="_#= $urlHtmlEncode(iconURL) =#_" alt="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= pictureId =#_" />
    </a>
    <div class="cbs-Detail" id="_#= dataContainerId =#_">
    <a class="cbs-Line1Link ms-noWrap ms-displayBlock" href="_#= linkURL =#_" title="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= line1LinkId =#_">_#= line1 =#_</a>
    <!--#_
    if(!line2.isEmpty)
    _#-->
    <div class="cbs-Line2 ms-noWrap" title="_#= $htmlEncode(line2.defaultValueRenderer(line2)) =#_" id="_#= line2Id =#_">_#= line2 =#_</div>
    <!--#_
    _#-->
    </div>
    </div>
    </div>
    </body>
    </html>
    And here´s the hover panel:
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    <head>
    <title>RC Customer Documents Hover Panel</title>
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:MasterPageDescription msdt:dt="string">Displays a result hover panel tailored for a Portable Document Format (PDF) document.</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#SearchHoverPanel;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:ManagedPropertyMapping msdt:dt="string">&#39;Title&#39;:&#39;Title&#39;,&#39;Path&#39;:&#39;Path&#39;,&#39;Description&#39;:&#39;Description&#39;,&#39;EditorOWSUSER&#39;:&#39;EditorOWSUSER&#39;,&#39;LastModifiedTime&#39;:&#39;LastModifiedTime&#39;,&#39;CollapsingStatus&#39;:&#39;CollapsingStatus&#39;,&#39;DocId&#39;:&#39;DocId&#39;,&#39;HitHighlightedSummary&#39;:&#39;HitHighlightedSummary&#39;,&#39;HitHighlightedProperties&#39;:&#39;HitHighlightedProperties&#39;,&#39;FileExtension&#39;:&#39;FileExtension&#39;,&#39;ViewsLifeTime&#39;:&#39;ViewsLifeTime&#39;,&#39;ParentLink&#39;:&#39;ParentLink&#39;,&#39;FileType&#39;:&#39;FileType&#39;,&#39;IsContainer&#39;:&#39;IsContainer&#39;,&#39;SecondaryFileExtension&#39;:&#39;SecondaryFileExtension&#39;,&#39;DisplayAuthor&#39;:&#39;DisplayAuthor&#39;,&#39;ServerRedirectedURL&#39;:&#39;ServerRedirectedURL&#39;</mso:ManagedPropertyMapping>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://d-records.isbank.is/rc/search/_catalogs/masterpage/Display%20Templates/Content%20Web%20Parts/_isb_record_center/tutorial/Item_RC_CustomerDocuments_HoverPanel.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
    <mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
    </head>
    <body>
    <div id="Item_RC_CustomerDocuments_HoverPanel">
    <!--#_
    var i = 0;
    var id = ctx.CurrentItem.csr_id;
    ctx.CurrentItem.csr_ShowFollowLink = true;
    ctx.CurrentItem.csr_ShowViewLibrary = true;
    ctx.currentItem_ShowChangedBySnippet = true;
    _#-->
    <div class="ms-srch-hover-innerContainer ms-srch-hover-standardSize" id="_#= $htmlEncode(id + HP.ids.inner) =#_">
    <div class="ms-srch-hover-arrowBorder" id="_#= $htmlEncode(id + HP.ids.arrowBorder) =#_"></div>
    <div class="ms-srch-hover-arrow" id="_#= $htmlEncode(id + HP.ids.arrow) =#_"></div>
    <div class="ms-srch-hover-content" id="_#= $htmlEncode(id + HP.ids.content) =#_" data-displaytemplate="RCCustomerDocumentsHoverPanel">
    <div id="_#= $htmlEncode(id + HP.ids.header) =#_" class="ms-srch-hover-header">
    _#= ctx.RenderHeader(ctx) =#_
    </div>
    <div id="_#= $htmlEncode(id + HP.ids.body) =#_" class="ms-srch-hover-body">
    _#= ctx.RenderBody(ctx) =#_
    </div>
    <div id="_#= $htmlEncode(id + HP.ids.actions) =#_" class="ms-srch-hover-actions">
    _#= ctx.RenderFooter(ctx) =#_
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>
    Thnx :)

  • Changing panels XY position via code ?

    Hi
    Here is Some info about my program.
    i have a main panel on which i create about 15 child panels and each child panel has a canvas control on it.
    i created a scrollbar which moves the xy position of each panel.
    i could not use the standard panel scroll bar because it is does not allow the amout child panels that i need that is why im rotating the 15 panels.
    Could someone please explain to me why when i change the childs panels xy position the display updates the panels position so slowly ?
    and how could i speed this up?
    Thanks
    Shako
    Help share your knowlegde

    Hello,
    Could you also post your code, so that we can see closely how you are implementing this? What version of CVI are you using? At what point does the time delay occur and how long is this delay? Note also this Knowledge Base:
    Adding a Scroll Bar to a Canvas Control in LabWindows/CVI
    http://digital.ni.com/public.nsf/allkb/33CBB49128DD6A1586256F7C0082EC96?OpenDocument
    Thanks,
    National Instruments

  • Position Sub VI front panel

    Is there an easy way of positioning the Front panel of a sub VI on a coordinate point of the calling VI?

    I just found the SnapToPanel utility on the community.
    Description
    The SnapToPanel VI enables you to position a Target VI window relative to a Reference VI window.
    Use the SnapToPanel VI in your application to control the position of sub-panels relative to the main application panel.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Settings Panel Position

    Does anyone know if there is a way to set the position of
    this panel somewhere on the stage? Any tricks or tips?
    Thanks.

    Jackal_Dude,
    > Does anyone know if there is a way to set the position
    > of this panel somewhere on the stage? Any tricks or
    tips?
    Your subject line mentions a Settings panel ... but I'm not
    sure which
    panel you mean. (There isn't a choice for "Settings" under
    the menubar's
    Window pull-down.) Do you mean the Property inspector? It's
    called
    Properties under the Window pull-down. In any case, what
    version of Flash
    are you using?
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Q:How to trim a VI's front panel at runtime?

    The occupied front panel space can be obtained by calling
    "GetPanelImage" via an invoke node. The resulting cluster "bounds"
    describes the union of all front panel objects. The front panel can then
    be resized to fit these bounds. The content of the front panel can be
    repositioned by manipulating "FrontPanelWindow.Origin". This "...Origin"
    points with an _unknown_ _offset_ (which varies with the FP´s layout) to
    the upper left corner of the front panel content.
    How to exactly calculate the origin from other front panel values?
    Thanks,
    TC

    You can use a VI Server to position the front panel of your subVI. Look at the Ghost in the Machine.vi example that ships with LabView.
    To see where to position the subVI, you need to know the position of the calling VI or of something on it. You could use a property node of the Get Details button.
    1. On the front panel on Panel.vi, right-click on Get Details and select Create >> Property Node
    2. Right-click on the Property Node and select Properties >> Position >> Left.
    3. Point to the bottom edge of the property node and pull it down to add another element. That element should default to Top.
    That will give you the coordinates of the Get Details button. Now use a VI server (based on Ghost in the Machine.vi) to place the subVI front panel the desired distance
    from the Get Details button.

  • Custom painting/ graphics in a panel

    Ten Duke Dollars for whoever gives the best high level solution for my problem.
    I'm writing a small application that displays music notation on screen and lets the user move the notes vertically to the desired locations on the staves. The user can then do various kinds of analysis on each example. The analysis stuff is done, but I'm having trouble finding an approach that will work for the graphics.
    My basic approach so far is to subclass JPanel and use it to handle all the custom painting. I'm planning to add all needed JPEG's to JLabels. Some of the images (e.g. treble and bass clef images) will always be in a fixed location, while others (note images) will move vertically when the user drags them. For the lines on the staves and the measure lines, I'm planning to use g.drawLine.
    The following questions occur to me:
    1. How will I prevent the note images from hiding the lines? Will I need to make the images transparent GIFs or something? Or can I set some layering property in the JPanel to build up a layered drawing?
    2. to detect mouse events, should I attach mouse listeners to my panel, or to each label that contains a note image? (I considered using Ellipse objects for the note heads and lines for the stems, but this will not give me a high enough quality of image.)
    3. I will probably need to use absolute positioning in the panel class rather than FlowLayout or whatever, but I'm having trouble getting rid of the layout manager. Can you give me a few lines of code to do this?
    4. Is my overall approach correct? Is there a better, easier way to accomplish what I'm trying to do?
    thanks,
    Eric

    >
    The following questions occur to me:
    1. How will I prevent the note images from hiding the
    lines? Will I need to make the images transparent GIFs
    or something? Or can I set some layering property in
    the JPanel to build up a layered drawing?If you are going to use images (probably BufferedImages), their Transparency will probably be BITMASK or TRANSLUSCENT.
    2. to detect mouse events, should I attach mouse
    listeners to my panel, or to each label that contains
    a note image? (I considered using Ellipse objects for
    the note heads and lines for the stems, but this will
    not give me a high enough quality of image.)I don't think using JLabel objects is a good idea. Instead of add labels to a panel, I would define a custom JComponent that did its own painting in paintComponent.
    >
    3. I will probably need to use absolute positioning in
    the panel class rather than FlowLayout or whatever,
    but I'm having trouble getting rid of the layout
    manager. Can you give me a few lines of code to do
    this?If you follow my last comment, your component isn't being used as a container, so this is not relevant.
    >
    4. Is my overall approach correct? Is there a better,
    easier way to accomplish what I'm trying to do?
    thanks,
    EricCheck out forum Java 2D. That's where this topic belongs. You also need to learn the 2D API. Search for some text book references in that forum.
    From the Imipolex G keyboard of...
    Lazlo Jamf

  • Front Panel objects do not stay in place after saving, closing, and reopening the VI.

    I have been working with a couple of versions of a main VI. The original VI was given to me so that I could add additional functionalities to it. I had been designing the front panel of the latest version of the VI on a Dell laptop running Windows 7 and LabView 2011 SP1 using a monitor with a resolution of 1920x1080. My booleans, numerics, and plots on the front panel had always stayed in place after saving, closing, and reopening the VI. Once in the field, I connected my laptop to a cRIO9073 and used my laptop screen with a resolution of 1366x768 to operate the VI. I made some changes to the VI, saved it, and reopened it. This time I noticed that the front panel objects had become overlapped, resized, and generally rearranged. I tried fixing the objects but I noticed that they reverted back to the incorrect positions after saving and reopening the VI. I was successful in keeping the objects in position a couple of times, but when I would open the VI at a later time, the objects were again rearranged. This is happening on both my monitor and laptop screen. The original version of the VI, however, does not behave this way and I have opened it on both my monitor and laptop screen. In this version, the front panel objects always stay in place. Both VI's have the same window size properties. Could I have corrupted the latest version of my VI somehow? Below are screenshots of the front panels of both VI's.
    Attachments:
    Blender Controller Original.PNG ‏140 KB
    Blender Controller.PNG ‏203 KB

    Hi Miguel,
    It is possible to programmatically set or change the position of front panel objects. (for example: http://digital.ni.com/public.nsf/allkb/4D0DA06B431​95B3F862572F3000AF2D3?OpenDocument) However, if you haven’t intentionally done that, it seems unlikely that it is the problem.
    Have you tried copying the entire block diagram in to a new VI to see if the problem persists? While it is unlikely, you are right that it is possible for VIs to become corrupted. I’ve never heard of a situation like this except in the situation where the settings Tom had you check have been changed. Here is some information about those settings:
    http://digital.ni.com/public.nsf/allkb/7567EF257B9​CFDF986256F630073228F?OpenDocument
    Since there was no rearrangement when you copied the front panel to a new VI, you might try copying the block diagram a little bit at a time to see if there is some particular part of it that creates the problem somehow.
    K. Johnson

  • How to emulate CSS fixed position in Flex 3

    Does anyone know how to emulate CSS fixed positioning in Flex 3?
    Canvas (absolute layout) uses coordinates same as HTML/CSS absolute positioning.
    How do I achieve fixed positioning where the panel is taken out of the flow and positioned relative to the application chrome?  (similiar to applicationcontrolbar, but not exactly)
    Someone please tell me if it is possible and some ideas how to achieve.
    Mike

    do not use the forum as marketing place for you site. if you want to share the content with SDN users, you have the blog area, wiki, article area.
    raja

  • Sliding panel inside tabbed panel - onclick both

    I have two tabbed panels, tab one has a sliding panel function in it with 5 panels. I am wondering that when you are in tab 2 that you can have a button that clicks to tab 1 AND to sliding panel 3 at the same time? I can make them work independently, but can't get it to accomplish both. I don't have a site that I can post but I could dummy one up if that would help.
    OK I have another scenario as well....
    You are on tab 1, sliding panel 4 and then go to tab 2. When you go back to tab 1 it holds the sliding panel 4 active. Is there a way that when you go back to tab 1 and it to default back to sliding panel 1? Basically I don't want it to hold the position of sliding panel 4 on tab 1.

    Try this and adapt to your needs:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Document sans nom</title>
    <script type="text/javascript" src="SpryAssets/SpryDOMUtils.js"></script>
    <script type="text/javascript" src="SpryAssets/SprySlidingPanels.js"></script>
    <link href="SpryAssets/SprySlidingPanels.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
    <style>
    .SlidingPanels {
       position: relative;
       width: 200px;
       height: 200px;
       padding: 0px;
    .SlidingPanelsContentGroup {
       position: relative;
       height:600px;
       margin: 0px;
       padding: 0px;
    .SlidingPanelsContent {
       width: 100%;
       height: 400px;
       overflow: hidden;
       margin: 0px;
       padding: 0px;
    </style>
    </head>
    <body>
    <a href="#" id="trigger1">Click me to go to Tab 1 and Panel 3</a>
    <div id="TabbedPanels1" class="TabbedPanels">
      <ul class="TabbedPanelsTabGroup">
        <li class="TabbedPanelsTab" tabindex="0" id="trigger2">Click mo to go to Tab1 and Panel 1</li>
        <li class="TabbedPanelsTab" tabindex="0">Onglet 2</li>
      </ul>
      <div class="TabbedPanelsContentGroup">
        <div class="TabbedPanelsContent">Contenu 1
          <a href="#" onClick="sp1.showPanel(0);">Panel 1</a>
          <a href="#" onClick="sp1.showPanel(1);">Panel 2</a>
          <a href="#" onClick="sp1.showPanel(2);">Panel 3</a>
             <div id="slidingPanel_1" class="SlidingPanels">
                  <div class="SlidingPanelsContentGroup">
                     <div id="content1" class="SlidingPanelsContent">The Content 1</div>
                <div id="content2" class="SlidingPanelsContent">The Content 2</div>
                <div id="content3" class="SlidingPanelsContent">The Content 3</div>
            </div>
          </div>
        </div>
        <div class="TabbedPanelsContent">Contenu 2</div>
      </div>
    </div>
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    var sp1 = new Spry.Widget.SlidingPanels("slidingPanel_1");
    Spry.Utils.addLoadListener(function() {
            Spry.$$("#trigger1").addEventListener('click', function() {
                TabbedPanels1.showPanel(0);
                sp1.showPanel(2);
            }, false);
            Spry.$$("#trigger2").addEventListener('click', function() {
                //TabbedPanels1.showPanel(0);
                sp1.showPanel(0);
            }, false);           
    </script>
    </body>
    </html>
    You may even do better using Spry.$$() CSS3-like selector (:first-child, nth-of-type(n), etc) to avoid adding ids on elements.
    Xav

Maybe you are looking for

  • Importing CS4 Keyboard Shortcuts to CS5

    I've  discovered that you can open your custom keyboard shortcuts xml file in a  text editor, and copy/paste shortcuts into your CS5 keyboard shortcuts  file. Anyone else tried this? Is there an easier way to import all of  your keyboard shortcuts fr

  • "Download error" when getting songs from iTunes on iPod touch 2G

    Hi all. Recently I've been getting a "Download Error. Tap to retry" message when I'm downloading songs from iTunes on my iPod Touch. It doesn't always happen, but seems to happen most if I leave the Download screen before the song is done downloading

  • System Crash when Playing Warcraft 3 on MacBook Pro running Windows XP

    I have the latest 2.4Ghz 15" MacBook Pro bought about a month ago. I installed BootCamp and Windows XP. Whenever I play Warcraft 3 on Windows XP, the system CRASHES and RESTARTS. This thing happens 100% of the time. Any suggestions?

  • Argh! My iTunes 7 is screwed!

    Well i downloaded itunes 7 last week and nothing was wrong except that it could only play music properly when the volume was on maximum, when it was on any other volume setting, the audio becomes fuzzy and distorted. But today, when i opened iTunes,

  • Noncontinuable exception error opening camera file

    Hi. I'm trying to open a camera file I generated in Camera FIle Generator in MAX. I keep getting an exception error with the popup of submitting an error report. (I actually have problems with 2 camera files, but I'm thinking the problems are related