----- Original Message -----
From: Mark Ingram
To: [email protected]
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();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:cont="com.ipauland.view.*" height="404">
<cont:TestContainer x="10" y="10">
<mx:Button label="myButton" x="185" y="117"/>
</cont:TestContainer>
</mx:Application>
Though I confess I rarely use design view these days. The container is there in
design view.
Hope that helps?
Paul
------------------------------------------------------------------------------
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Paul
Andrews
Sent: 05 December 2007 09:57
To: [email protected]
Subject: Re: [flexcoders] How does Panel work in designer / layout?
----- Original Message -----
From: Mark Ingram
To: [email protected]
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