Hey Ravi , Thanks for replying.. i done that part by setting width and height in percent.. so it is automatically changes the size of its children.. Thanks for replying Regards, Akshay
On Feb 24, 6:33 pm, Ravi <[email protected]> wrote: > Hi Akshay, > > Lets say you are creating a child called a_child. Then you can define > the height and width of that child as follows: > > var a_child:VBox = new VBox(); // i am taking child as VBox > a_child.height = parent.height * fraction //(fraction represents the > ratio of child's height and parents height) > a_child.width = parent.width * fraction; > > parent.addChild(a_child); > > I think this should solve your problem. > > You can get the number of children by parent.getChildren.length and > reference of child can be get as parent.getChildIndex(a_child); > > HTH, > > -Ravi > > On Feb 24, 6:07 pm, akshay gore <[email protected]> wrote: > > > Hi all, > > I am developing one editing tool in which i am doing adding > > page layout functionality (portrait/landscape) now the problem is > > that for page i am using canvas n when i change the height and width > > of the page i also want to change its children height n width .. but > > how can change the layout of each child becoz i am adding its children > > dynamically.. How could i find that how many children are there?? How > > could i get the reference of each child ?? Pl help me.. Is there > > another way to do it?? Pl let me know.. > > Thanks, > > Regards, > > Akshay > > > On Feb 24, 5:46 pm, akshay gore <[email protected]> wrote: > > > > Hi Ravi, > > > Thanks for reply .. Can u tell me how can i bind parent's > > > width n height with child's > > > Pls tell me.. > > > Regards, > > > Akshay > > > > On Feb 24, 5:30 pm, Ravi <[email protected]> wrote: > > > > > I am not sure but I think you should bind the height and width of > > > > child box to the height and width of parent(canvas) {parent.height}. > > > > Just try it out and let me know if it works. > > > > > -Ravi > > > > > On Feb 24, 4:34 pm, akshay gore <[email protected]> wrote: > > > > > > Hi all, > > > > > I have a Canvas in my application, in that i am adding a > > > > > child (box) dynamically.. now when i change the height n width > > > > > (Layout) of the canvas dynamically i also want its children get > > > > > resized accordingly .. Here i am getting the problem that children > > > > > (Layout) are not changing according to parent (canvas).. Is there > > > > > anyway to do this? which property should i set that it will be done > > > > > automatically? > > > > > Thanks in advance, > > > > > Regards, > > > > > Akshay --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

