depth with flex component

159 views
Skip to first unread message

learner

unread,
Sep 17, 2007, 3:33:05 AM9/17/07
to Flex India Community
Hi all,

Is there any  way to manage the depth for flex component.

for example , if in canvas we have one button and one panel..
and we  want the button to appear on the top of the panel. (not inside the panel nor in the header of the panel.)
So what  is the way to achieve this..
flexbuilder automatically arrange the compoents on top of each other...according to  the order we add them while laying out the UI.
but is there any other way. (like getNextHighestDepth() in actionsctript2) ?
I have heard of displayList but not sure how to make use of it..

It will be great If somebody here can suggest a solution.

Thanks in advance
Regards
PS


Debabrata Acharjee

unread,
Sep 17, 2007, 3:53:15 AM9/17/07
to Flex India Community
You can control the order of children (depth) by adding them in a
specific order. You can also control them as follows:

By using the addChildAt() method to specify where among the
component's children to add a child
By using the setChildIndex() method to specify the location of a
specific child among a component's children in the display list.


-Debabrata

mrinal wadhwa

unread,
Sep 17, 2007, 4:20:32 AM9/17/07
to flex_...@googlegroups.com
Just to add a little to that .. in mxml the children get added in the order that they appear in the mxml code ... so the last (tag) component is on top in that container ... this is the reason of the ordering that you see in flexbuilder.
_
Mrinal
http://weblog.mrinalwadhwa.com

Mayur Bais

unread,
Sep 17, 2007, 4:49:50 AM9/17/07
to flex_...@googlegroups.com
thanks got that!

Is there no way that we can add it in properties of the child in the mxml tag? (we can always write our own custom components to make these things available as proeprties still was)

I think the order in which  child are added to the parents components ,flex indexed them in that order.
(getChildIndex(childItem) gave me  the index of any child in relation with its immediate parent..)

Regards
PS






On 9/17/07, Debabrata Acharjee <deb....@gmail.com> wrote:

Priti Gupta

unread,
Sep 13, 2012, 8:44:38 AM9/13/12
to flex_...@googlegroups.com
you know default layout of canvas is absolute so you need to give the x and y position.

On Thu, Sep 13, 2012 at 4:00 AM, abilash reddy <abi.ab...@gmail.com> wrote:
and how to maintain that the parent is always on the top its children,,,? i mean if the chidren are dragged over its boundary,,,the outside part of the chid goes under the parent..!

--
You received this message because you are subscribed to the Google Groups "Flex India Community" group.
To view this discussion on the web visit https://groups.google.com/d/msg/flex_india/-/cSmpEg_2YcgJ.
To post to this group, send email to flex_...@googlegroups.com.
To unsubscribe from this group, send email to flex_india+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.

Reply all
Reply to author
Forward
0 new messages