Re: [flexcoders] How does Panel work in designer / layout?
- Original Message - From: "Paul Andrews" <[EMAIL PROTECTED]> To: Sent: Wednesday, December 05, 2007 11:12 AM Subject: Re: [flexcoders] How does Panel work in designer / layout? > Flex completely ignores the x,y position inside my TestPanel. LOL - adding layout="absolute" might be a good idea! > Hmm. > > > Paul
Re: [flexcoders] How does Panel work in designer / layout?
Actually Mark, I take your point. When I tried it using a Panel, it wasn't so good. Unfortunately these days I tend not to use the designer. Certainly the designer has some issues! Paul - Original Message - From: Paul Andrews To: flexcoders@yahoogroups.com Sent: Wednesday, December 05, 2007 10:37 AM Subject: Re: [flexcoders] How does Panel work in designer / layout? - Original Message - From: Mark Ingram To: flexcoders@yahoogroups.com Sent: Wednesday, December 05, 2007 10:01 AM Subject: RE: [flexcoders] How does Panel work in designer / layout? Hi, if the container is made as a separate class, then I add it to my main application, I can't position buttons inside an internal container - it doesn't recognise my new control as an actual container (even though it is a series of canvases and vboxes). The following is OK for me: package com.ipauland.view { import mx.containers.Canvas; public class TestContainer extends Canvas { public function TestContainer() { super(); } } } http://www.adobe.com/2006/mxml"; layout="absolute" xmlns:cont="com.ipauland.view.*" height="404"> Though I confess I rarely use design view these days. The container is there in design view. Hope that helps? Paul From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews Sent: 05 December 2007 09:57 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How does Panel work in designer / layout? - Original Message - From: Mark Ingram To: flexcoders@yahoogroups.com Sent: Wednesday, December 05, 2007 9:48 AM Subject: [flexcoders] How does Panel work in designer / layout? Hi, how does the Panel class work in the designer? i.e. when I drag a button on, the designer knows to place the button inside the white area in the centre of the panel. All coordinates are in relation to that white area. I have a container class which is similar in layout to the panel (but different enough to require a separate class) and I want to be able to add it to another container and then add controls to it. I hope that makes sense. Maybe this ascii drawing will help J |---| || ||--| | || || ||--| | || |---| If I drop a button onto this control, I want all coordinates to be in relation to the centre container. If the button is inside the container, it's coordinates will be relative to the container. Thanks, Mark
Re: [flexcoders] How does Panel work in designer / layout?
- Original Message - >From: Mark Ingram >To: flexcoders@yahoogroups.com >Sent: Wednesday, December 05, 2007 10:54 AM >Subject: RE: [flexcoders] How does Panel work in designer / layout? > > >Hi Paul, thanks for that - what if you had another container inside >TestContainer? With say a 20 pixel border around all sides. How could you >add a button to the child container >(not the parent container). > >Thanks, > >Mark Interesting question: package com.ipauland.view { import mx.containers.Panel; public class TestPanel extends Panel { public function TestPanel() { super(); } } } package com.ipauland.view { import mx.containers.VBox; public class TestVBox extends VBox { public function TestVBox() { super(); } } } http://www.adobe.com/2006/mxml"; layout="absolute" xmlns:cont="com.ipauland.view.*" height="404" xmlns:comp="comp.*"> Flex completely ignores the x,y position inside my TestPanel. Hmm. Paul
Re: [flexcoders] How does Panel work in designer / layout?
- Original Message - From: Mark Ingram To: flexcoders@yahoogroups.com Sent: Wednesday, December 05, 2007 10:01 AM Subject: RE: [flexcoders] How does Panel work in designer / layout? Hi, if the container is made as a separate class, then I add it to my main application, I can't position buttons inside an internal container - it doesn't recognise my new control as an actual container (even though it is a series of canvases and vboxes). The following is OK for me: package com.ipauland.view { import mx.containers.Canvas; public class TestContainer extends Canvas { public function TestContainer() { super(); } } } http://www.adobe.com/2006/mxml"; layout="absolute" xmlns:cont="com.ipauland.view.*" height="404"> Though I confess I rarely use design view these days. The container is there in design view. Hope that helps? Paul -- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews Sent: 05 December 2007 09:57 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How does Panel work in designer / layout? - Original Message - From: Mark Ingram To: flexcoders@yahoogroups.com Sent: Wednesday, December 05, 2007 9:48 AM Subject: [flexcoders] How does Panel work in designer / layout? Hi, how does the Panel class work in the designer? i.e. when I drag a button on, the designer knows to place the button inside the white area in the centre of the panel. All coordinates are in relation to that white area. I have a container class which is similar in layout to the panel (but different enough to require a separate class) and I want to be able to add it to another container and then add controls to it. I hope that makes sense. Maybe this ascii drawing will help J |---| || ||--| | || || ||--| | || |---| If I drop a button onto this control, I want all coordinates to be in relation to the centre container. If the button is inside the container, it's coordinates will be relative to the container. Thanks, Mark
RE: [flexcoders] How does Panel work in designer / layout?
Hi, if the container is made as a separate class, then I add it to my main application, I can't position buttons inside an internal container - it doesn't recognise my new control as an actual container (even though it is a series of canvases and vboxes). From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews Sent: 05 December 2007 09:57 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How does Panel work in designer / layout? - Original Message - From: Mark Ingram <mailto:[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com <mailto:flexcoders@yahoogroups.com> Sent: Wednesday, December 05, 2007 9:48 AM Subject: [flexcoders] How does Panel work in designer / layout? Hi, how does the Panel class work in the designer? i.e. when I drag a button on, the designer knows to place the button inside the white area in the centre of the panel. All coordinates are in relation to that white area. I have a container class which is similar in layout to the panel (but different enough to require a separate class) and I want to be able to add it to another container and then add controls to it. I hope that makes sense. Maybe this ascii drawing will help :-) |---| || ||--| | || || ||--| | || |---| If I drop a button onto this control, I want all coordinates to be in relation to the centre container. If the button is inside the container, it's coordinates will be relative to the container. Thanks, Mark
Re: [flexcoders] How does Panel work in designer / layout?
- Original Message - From: Mark Ingram To: flexcoders@yahoogroups.com Sent: Wednesday, December 05, 2007 9:48 AM Subject: [flexcoders] How does Panel work in designer / layout? Hi, how does the Panel class work in the designer? i.e. when I drag a button on, the designer knows to place the button inside the white area in the centre of the panel. All coordinates are in relation to that white area. I have a container class which is similar in layout to the panel (but different enough to require a separate class) and I want to be able to add it to another container and then add controls to it. I hope that makes sense. Maybe this ascii drawing will help J |---| || ||--| | || || ||--| | || |---| If I drop a button onto this control, I want all coordinates to be in relation to the centre container. If the button is inside the container, it's coordinates will be relative to the container. Thanks, Mark
RE: [flexcoders] How does Panel work in designer / layout?
Hi Paul, thanks for that - what if you had another container inside TestContainer? With say a 20 pixel border around all sides. How could you add a button to the child container (not the parent container). Thanks, Mark From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews Sent: 05 December 2007 10:38 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How does Panel work in designer / layout? - Original Message - From: Mark Ingram <mailto:[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com <mailto:flexcoders@yahoogroups.com> Sent: Wednesday, December 05, 2007 10:01 AM Subject: RE: [flexcoders] How does Panel work in designer / layout? Hi, if the container is made as a separate class, then I add it to my main application, I can't position buttons inside an internal container - it doesn't recognise my new control as an actual container (even though it is a series of canvases and vboxes). The following is OK for me: package com.ipauland.view { import mx.containers.Canvas; public class TestContainer extends Canvas { public function TestContainer() { super(); } } } http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> " layout="absolute" xmlns:cont="com.ipauland.view.*" height="404"> Though I confess I rarely use design view these days. The container is there in design view. Hope that helps? Paul From: flexcoders@yahoogroups.com <mailto:flexcoders@yahoogroups.com> [mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews Sent: 05 December 2007 09:57 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How does Panel work in designer / layout? - Original Message - From: Mark Ingram <mailto:[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com <mailto:flexcoders@yahoogroups.com> Sent: Wednesday, December 05, 2007 9:48 AM Subject: [flexcoders] How does Panel work in designer / layout? Hi, how does the Panel class work in the designer? i.e. when I drag a button on, the designer knows to place the button inside the white area in the centre of the panel. All coordinates are in relation to that white area. I have a container class which is similar in layout to the panel (but different enough to require a separate class) and I want to be able to add it to another container and then add controls to it. I hope that makes sense. Maybe this ascii drawing will help :-) |---| || ||--| | || || ||--| | || |---| If I drop a button onto this control, I want all coordinates to be in relation to the centre container. If the button is inside the container, it's coordinates will be relative to the container. Thanks, Mark