RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Merrill, Jason
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jim Hayes Sent: Thursday, January 17, 2008 11:05 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Merrill, Jason
Sent: Thursday, January 17, 2008 8:05 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components? Not quite sure exactly what you're looking for here Jason, but I'm guessing it's something like

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Jim Hayes
@yahoogroups.com on behalf of Merrill, Jason Sent: Fri 18/01/2008 12:46 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components? OK, so I am now 90% there with this now, thanks to Alex and Jim. I have it working to auto-center if the panel re-sizes

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Merrill, Jason
OK, so I am now 90% there with this now, thanks to Alex and Jim. I have it working to auto-center if the panel re-sizes. Now the last part I still don't know how to tackle: the drawn graphics can still extend over the edges of the Panel component if the graphics are very large or there are a

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Merrill, Jason
] On Behalf Of Jim Hayes Sent: Thursday, January 17, 2008 11:05 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components? Not quite sure exactly what you're looking for here Jason, but I'm guessing it's

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Merrill, Jason
Nevermind, I was setting minWidth and minHeight incorrectly - I moved them from the MXML to a static constant in the component, which it didn't like. It works now. Thanks everyone for your help! Jason Merrill Bank of America GTO LLD Solutions Design Development eTools Multimedia Bank of

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Merrill, Jason
Subject: RE: [flexcoders] Drawn objects acting as children to components? So the problem remains, when scaling up the graphic drawn inside the UIComponent, if scaled up enough, it extends beyond the boundaries of the Panel container. arrg just when I though I

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Merrill, Jason
So the problem remains, when scaling up the graphic drawn inside the UIComponent, if scaled up enough, it extends beyond the boundaries of the Panel container. arrg just when I though I had this figured out. Here is my code, try it yourself: The MXML: mx:Panel id=networkBrowserPanel

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Merrill, Jason
Hey Jim, passing minWidth and minHeight to the custom UI component worked perfectly for me - now the drawn graphic is contained in the Panel container - thank you! Jason Merrill Bank of America GTO LLD Solutions Design Development eTools Multimedia Bank of America Flash Platform

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Alex Harui
@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components? Hey Jim, passing minWidth and minHeight to the custom UI component worked perfectly for me - now the drawn graphic is contained in the Panel container - thank you! Jason Merrill Bank of America GTO LLD Solutions

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Merrill, Jason
To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components? You want the bounds of what you drew, so getBounds(this) should be correct. If you set scaleX/Y to zoom, you shouldn't need to do anything

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Merrill, Jason
: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Friday, January 18, 2008 12:10 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components? I think in the general case

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Alex Harui
10:36 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components? I thought the container reference was needed by the getBounds() method - it requires an argument of a UIComponent of some kind, I thought the custom component would need to know

Re: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Jonathan Branam
:* Friday, January 18, 2008 10:36 AM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] Drawn objects acting as children to components? I thought the container reference was needed by the getBounds() method - it requires an argument of a UIComponent of some kind, I thought

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-18 Thread Merrill, Jason
PROTECTED] On Behalf Of Jonathan Branam Sent: Friday, January 18, 2008 3:11 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Drawn objects acting as children to components? Instead of changing the height, which will not affect

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-17 Thread Alex Harui
UIComponent does not map its width/height to the bounds of what you draw. Therefore the Panel doesn't know that it has size and doesn't correctly know when to clip it or how to layout according to its size. You could write a subclass that does map width/height to those bounds.

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-17 Thread Merrill, Jason
Platform Developer Community From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Thursday, January 17, 2008 5:47 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-17 Thread Alex Harui
; } } From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, January 17, 2008 3:03 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components? Thanks. So you

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-17 Thread Merrill, Jason
:14 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components? UIComponent. It must report valid measurements in order for Panel to handle it correctly. What you are doing

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-17 Thread Merrill, Jason
OK, I'm about 80% there now. However, the graphic appears at location 0,0 in the panel and extends outside the panel boundaries. I set the params in MXML like this: mx:Panel id=networkBrowserPanel width=100% height=100% layout=absolute title=Network mx:VBox horizontalAlign=left

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-17 Thread Alex Harui
@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, January 17, 2008 4:49 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components? OK, I'm about 80% there now. However, the graphic appears at location 0,0 in the panel

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-17 Thread Merrill, Jason
OK, thanks, I have knocked this down to it's simplest form. The graphic appears in the right spot, but it does not respond to changes in the panel's size change. I'm not sure how to implement that in my component. I'm passing in a reference to the Panel container, but it's not responding to it's

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-17 Thread Jim Hayes
@yahoogroups.com on behalf of Merrill, Jason Sent: Fri 18/01/2008 01:42 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Drawn objects acting as children to components? OK, thanks, I have knocked this down to it's simplest form. The graphic appears in the right spot, but it does not respond to changes

RE: [flexcoders] Drawn objects acting as children to components?

2008-01-17 Thread Alex Harui
] Drawn objects acting as children to components? Not quite sure exactly what you're looking for here Jason, but I'm guessing it's something like this: (I've just hacked at your last example since its very late here and I'm tired, but hope it helps get you a bit further). Note your component