Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7602213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:21:21+00:00 2026-05-30T23:21:21+00:00

I want to create a custom LinkBar in which the item which is selected

  • 0

I want to create a custom LinkBar in which the item which is selected shown with some space before the text or anything else as shown in the Image below.
enter image description here

when second item is selected then Two is having some effect and move slightly to left side.

when third item is selected then Three is having some effect and move slightly to left side and Two move at its original place.

Please Help me …

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T23:21:22+00:00Added an answer on May 30, 2026 at 11:21 pm

    This simple application demos a basic approach to doing this with spaces, its not bullet proof by any means, but it works, and its build on Flex SDK 3.6.

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="100%" height="100%">
    
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.events.FlexEvent;
                import mx.events.ItemClickEvent;
                private var _labels:Array = ["link 1", "link 2", "link 3"];
                private var _links:ArrayCollection = new ArrayCollection();
    
                /**
                 * Creation complete handler for linkbar.
                 * Sets up the link bar data provider.
                 * 
                 * @param FlexEvent creation complete event dispatched from link bar
                 * */
                private function links_creationCompleteHandler(event:FlexEvent):void{
                    resetLinks();
                    linkBar.dataProvider = _links;
                }
    
                /**
                 * Item click handler for link bar.
                 * Checks if user has selected the same link again.
                 * If not then resets the link bar data provider with original label values.
                 * Then adds event.label with 4 leading spaces at the index of the same string in array col.
                 * Then removes the original string form the array col.
                 * 
                 * @param ItemClickEvent dispatched from link bar
                 * */
                private function links_itemClickHandler(event:ItemClickEvent):void{
                    if (event.label.search("    ") == -1){
                        resetLinks();
                        _links.addItemAt("    " + event.label, event.index);
                        _links.removeItemAt(event.index + 1);
                    }
    
                }
    
                /**
                 * Remove all items from the link bar data provider.
                 * Then add back in the original items to reset item labels.
                 * */
                private function resetLinks():void{
                    _links.removeAll();
                    for each (var str:String in _labels){
                        _links.addItem(str);
                    }
                }
    
            ]]>
        </mx:Script>
    
        <mx:LinkBar id="linkBar"
                    direction="vertical"
                    creationComplete="links_creationCompleteHandler(event)"
                    width="100"
                    itemClick="links_itemClickHandler(event)"/>
    </mx:Application>
    

    In summary, it just adds some spaces onto the front of the item label selected. It does this by resetting the linkbars data provider each time the link bar dispatches the item click event. Then adding a replacement label for the selected item, removing the old one.

    Feels a little clunky, and you could probably do something smoother with effects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create custom UIButton like [ IMAGE here text here ] How
I want to create a custom toolbar control (descendant TToolBar) which should have some
I want to create custom templated control which controls inside of template coluld be
I want to create a Custom Scroll bar in my FLEX 3.0 application. Which
I want to create a custom View which contains two buttons without using xml.
I want to create a custom field on which I can place more than
I want to create a custom MSBuild task that changes my .cs files before
I want to create a custom file image format that holds inside PNG images.
I want to create a custom malloc which allocates memory blocks within a given
I want to create a custom TableViewCell on which I want to have UITextField

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.