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 6712837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:18:27+00:00 2026-05-26T08:18:27+00:00

i am trying to make a group of spark type in flex at runtime.i

  • 0

i am trying to make a group of spark type in flex at runtime.i am making a couple of buttons as children of this group in runtime. i want to add border to all group. however when i use border container it hides all other children and the stuff in group container and only shows the border container screen. How can i add border to group.

Note that i am adding the border container as a child of group container in run time.

best regards

  • 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-26T08:18:27+00:00Added an answer on May 26, 2026 at 8:18 am

    You can add a s:Rect child at particular index acting as a border.

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx">
    
    <fx:Script>
        <![CDATA[
            import mx.graphics.SolidColorStroke;
    
            import spark.primitives.Rect;
    
            protected function addNewBorderButtonClick(event:MouseEvent):void
            {
                var borderRect:Rect = new Rect();
                var solidStroke:SolidColorStroke = new SolidColorStroke(0, 3);
                borderRect.stroke = solidStroke;
                borderRect.percentWidth = borderRect.percentHeight = 100;
    
                targetGroup.addElementAt(borderRect, 0);
            }
        ]]>
    </fx:Script>
    
    <fx:Declarations>
    </fx:Declarations>
    
    <s:Group id="targetGroup" 
             width="100" height="100"
             horizontalCenter="0" verticalCenter="0">
        <!-- some visual elements here -->
        <s:Button id="addNewBorderButton" 
                  label="Add Border"
                  horizontalCenter="0" verticalCenter="0"
                  click="addNewBorderButtonClick(event)" />
    </s:Group>
    </s:Application>
    

    Hope this helps,

    Blaze

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

Sidebar

Related Questions

I am trying to make a group activity with the radio widget. My problem
Hi I am trying to make a drop down list for a group of
I'm trying to make a case against automated checkins to version control. My group
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
I'm trying to make a radio group specifying a bunch of options, and an
I'm trying to make a WPF user control that includes two group boxes and
I'm trying make one treeView with infinite subgroups. I can add my groups but
I'm with a group trying to make a campus GPS on android(and later other
I'm trying to make a query that would do something like this... id |
I am trying to make a SQLite table for group of contacts, but I

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.