Difference between canvas and panel?

327 views
Skip to first unread message

Priti Gupta

unread,
Jun 11, 2012, 4:05:18 PM6/11/12
to flex_...@googlegroups.com
Hi all,

i did not find anywhere the difference between canvas and panel in flex. please explain it.....



sampath 123

unread,
Jun 12, 2012, 9:21:30 AM6/12/12
to flex_...@googlegroups.com
Hi ,
  In panel  you can use the layout for aligning the components where as in canvas we cant use the layouts we can manually align the components by using the x and y properties and  you can easily identify the panel with with the titlebar whereas a canvas has  no titlebar  and has no border .

On Tue, Jun 12, 2012 at 1:35 AM, Priti Gupta <mailtopr...@gmail.com> wrote:
Hi all,

i did not find anywhere the difference between canvas and panel in flex. please explain it.....



--
You received this message because you are subscribed to the Google Groups "Flex India Community" group.
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.

Divya Agarwal

unread,
Jun 12, 2012, 5:15:28 AM6/12/12
to Flex India Community
A panel has fixed layout you cannot placed its child components to any
position in panel but in canvas you can place its child component
anywhere with in the canvas it have auto layout default. Also canvas
is not a visible container by default but panel is.


Regards
Divya

sampath 123

unread,
Jun 13, 2012, 1:17:36 AM6/13/12
to flex_...@googlegroups.com
 You are saying that panel has a fixed layout ok but inside panel  we may use the skinnablecontainers inside the containers we define the layout   so we can overcome the fixed laout like this

abhishekchess1

unread,
Jun 13, 2012, 4:11:04 AM6/13/12
to flex_...@googlegroups.com
hey r u talking abt flex 3 canvas and panel  ?

gourav kumar

unread,
Jun 13, 2012, 10:37:30 AM6/13/12
to flex_...@googlegroups.com
Hi ,
If you still have issue , do contact me via mail.

Thanks

--
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/-/N0GIR-ft5D8J.

Priti Gupta

unread,
Jun 13, 2012, 9:33:39 AM6/13/12
to flex_...@googlegroups.com
yes...generally if some interviewer ask..then what should the reply?

Ali Hasan

unread,
Jun 15, 2012, 12:54:44 AM6/15/12
to flex_...@googlegroups.com
hi,   Panel and Canvas are definitely not the same. Panel can layout its children for you based on the layout property. Its also got a title bar. 

Canvas will not layout its children. Please find more details below. 

http://livedocs.adobe.com/flex/3/langref/mx/containers/Panel.html 
http://livedocs.adobe.com/flex/3/langref/mx/containers/Canvas.html 

Hope this helps
 

gourav kumar

unread,
Jun 17, 2012, 10:22:43 AM6/17/12
to flex_...@googlegroups.com, mailtopr...@gmail.com
Hii Priti,

Ok let see is this this infor is enough for you or not?

1.Canvas extends Container implements IConstraintLayout & Panel extends Container
2.A Panel container consists of a title bar, a caption, a border,
   and a  content area for its children.
   Typically, you use Panel containers to wrap top-level application modules.
   For example, you could include a Any Title in a Panel container.
 
But

   A Canvas layout container defines a rectangular region
   in which you place child containers and controls.
   It is the only container that lets you explicitly specify the location
   of its children within the container by using the <code>x</code> and
   <code>y</code> properties of each child. 


If you want to  give perfect ans to interviewer read  property's of both of Component they both have some diff properys explain this
if you still have any issue feel free to mail me.

One more thing  have my personal blog for interview if wana some more q? i will mail u.


Bye tc  

rahul iyer

unread,
Nov 30, 2012, 1:45:28 AM11/30/12
to flex_...@googlegroups.com, mailtopr...@gmail.com
Hi .
Basically , Panel arranges your components based on layout you specify.
 It has an caption , title bar , border to it. Hence visible by itself

Canvas on other hand , uses absolute layout       .So have to specify x nad y co-ordinates. If you dont it will use auto layout.
Canvas is not visible by itself


Thanks
Rahul
Reply all
Reply to author
Forward
0 new messages