RE: [flexcoders] Drawing in Panel Insanity

2008-02-20 Thread Jim Hayes
Last time I needed the scrollbars property of a component I found that
the scrollbar was protected - so had to extend the component itself and
add methods to get scrollbar width etc.
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Merrill, Jason
Sent: 19 February 2008 20:04
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Drawing in Panel Insanity
 
Right, but I mean I can't seem to find the method or properties to find
the panel's scrollbars in the Panel content area - nothing I could find
in the help docs.  
 
Got it working because I made the dumb mistake of calling width on the
UIComponent instead of the panel itself.  
 
Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 
Bank of America Flash Platform Developer Community 
 
Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 



 
 



From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 2:50 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Drawing in Panel Insanity
You can access their height and width directly.
How did you get it working?
On Feb 19, 2008 1:11 PM, Merrill, Jason
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:
Hey Eric, I didn't thank you for your help thanks.  I have
it working now.
 
By the way, is there a way to get the scrollbar's width (for the
vertical scrollbar) and height style (for the horizontal scroll bar) in
the container form of the panel?
 
Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 
Bank of America Flash Platform Developer Community 
 
Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 



 
 



From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 12:36 PM
To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Drawing in Panel Insanity
You're probably not taking in account the panel's border
thickness properties.  When you get the panel's width it's including the
border (not just where the content is being drawn like youre imagining).
To get the true width of the content area youd need to subtract
getStyle(borderThicknessRight) and getStyle(borderThicknessLeft).
Hope this helps
Eric Cancil
On Feb 19, 2008 12:29 PM, Merrill, Jason
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:
So I've been writing an Actionscript component that
extends UIComponent and is wrapped inside a Panel tag.  The UIComponent
has code that draws a flowchart of sorts into the content area of the
Panel, based on a dataprovider it's bound to. Everything works fine
there, and the drawn graphics change when the dataprovider changes
automatically.  The drawn objects also stay within the boundaries of the
Panel content area, thanks to some help on this list with overriding
some protected methods.  
 
The problem I still have though, is getting the drawn
content to stay centered in the content area, including when the Panel
is resized (either by resizing the browser window, since the Panel's
width is 100%, or by moving an HDividedBox divider that separates it
from other panels), or when the drawn content changes size.  I can
measure the size of the drawn content easily enough using the
getBounds() method of Rectangle class, but not the Panel's content area
- the width and height seem to be way off when I measure them.
 
The other problem is getting the scrollbars to be
accurate.  I'm getting really confused by Panel's unscaledWidth,
unscaledHeight, measuredWidth, measuredHeight, width, height,
explicitWidth, and explicitHeight properties and how

RE: [flexcoders] Drawing in Panel Insanity

2008-02-20 Thread Merrill, Jason
Cool - do have some sample methods that get the scrollbar width of a
component that extends panel?
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 




 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Jim Hayes
Sent: Wednesday, February 20, 2008 5:17 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Drawing in Panel Insanity





Last time I needed the scrollbars property of a component I
found that the scrollbar was protected - so had to extend the component
itself and add methods to get scrollbar width etc.



-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: 19 February 2008 20:04
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Drawing in Panel Insanity



Right, but I mean I can't seem to find the method or properties
to find the panel's scrollbars in the Panel content area - nothing I
could find in the help docs.  



Got it working because I made the dumb mistake of calling width
on the UIComponent instead of the panel itself.  



Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 



Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 













From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 2:50 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Drawing in Panel Insanity

You can access their height and width directly.
How did you get it working?

On Feb 19, 2008 1:11 PM, Merrill, Jason
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Hey Eric, I didn't thank you for your help thanks.
I have it working now.



By the way, is there a way to get the scrollbar's width
(for the vertical scrollbar) and height style (for the horizontal scroll
bar) in the container form of the panel?



Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 



Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 













From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 12:36 PM
To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Drawing in Panel
Insanity

You're probably not taking in account the
panel's border thickness properties.  When you get the panel's width
it's including the border (not just where the content is being drawn
like youre imagining).  To get the true width of the content area youd
need to subtract getStyle(borderThicknessRight) and
getStyle(borderThicknessLeft).
Hope this helps

RE: [flexcoders] Drawing in Panel Insanity

2008-02-20 Thread Jim Hayes
I was using comboBox at the time, can't tell you if panel is the same
I'm afraid, but at a guess it probably might be :-)
My source here : http://ifeedme.com/blog/?p=19 (run the demo and right
click),  hope it helps.
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Merrill, Jason
Sent: 20 February 2008 15:46
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Drawing in Panel Insanity
 
Cool - do have some sample methods that get the scrollbar width of a
component that extends panel?
 
Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 
Bank of America Flash Platform Developer Community 
 
Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 



 
 



From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Jim Hayes
Sent: Wednesday, February 20, 2008 5:17 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Drawing in Panel Insanity
Last time I needed the scrollbars property of a component I
found that the scrollbar was protected - so had to extend the component
itself and add methods to get scrollbar width etc.
-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: 19 February 2008 20:04
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Drawing in Panel Insanity
Right, but I mean I can't seem to find the method or properties
to find the panel's scrollbars in the Panel content area - nothing I
could find in the help docs.  
Got it working because I made the dumb mistake of calling width
on the UIComponent instead of the panel itself.  
Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 
Bank of America Flash Platform Developer Community 
Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 







From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 2:50 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Drawing in Panel Insanity
You can access their height and width directly.
How did you get it working?
On Feb 19, 2008 1:11 PM, Merrill, Jason
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:
Hey Eric, I didn't thank you for your help thanks.
I have it working now.
By the way, is there a way to get the scrollbar's width
(for the vertical scrollbar) and height style (for the horizontal scroll
bar) in the container form of the panel?
Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 
Bank of America Flash Platform Developer Community 
Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 







From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 12:36 PM
To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Drawing in Panel
Insanity
You're probably not taking in account the
panel's border thickness properties.  When you get the panel's width
it's including

RE: [flexcoders] Drawing in Panel Insanity

2008-02-20 Thread Merrill, Jason
Thanks Jim! I'll check it out.
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 




 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Jim Hayes
Sent: Wednesday, February 20, 2008 12:00 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Drawing in Panel Insanity





I was using comboBox at the time, can't tell you if panel is the
same I'm afraid, but at a guess it probably might be :-)

My source here : http://ifeedme.com/blog/?p=19
http://ifeedme.com/blog/?p=19  (run the demo and right click),  hope
it helps

Recent Activity

*   
 104
New Members
http://groups.yahoo.com/group/flexcoders/members;_ylc=X3oDMTJnZmJmbWIzB
F9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsB
HNsawN2bWJycwRzdGltZQMxMjAzNTI3MDI1 

Visit Your Group
http://groups.yahoo.com/group/flexcoders;_ylc=X3oDMTJmMDZtYnZmBF9TAzk3M
zU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsBHNsawN2Z
2hwBHN0aW1lAzEyMDM1MjcwMjU- 
Yahoo! Finance

It's Now Personal
http://us.ard.yahoo.com/SIG=13oto0b2o/M=493064.12016257.12445664.867457
8/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1203534225/L=/B=Ls0WGULaX90-/J=12
03527025995303/A=4507179/R=0/SIG=12de4rskk/*http://us.rd.yahoo.com/evt=5
0284/*http://finance.yahoo.com/personal-finance 

Guides, news,

advice  more.

New business?

Get new customers.
http://us.ard.yahoo.com/SIG=13ot8h0l9/M=493064.12016308.12445700.867457
8/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1203534225/L=/B=L80WGULaX90-/J=12
03527025995303/A=3848640/R=0/SIG=131an6mds/*http://searchmarketing.yahoo
.com/arp/srchv2.php?o=US2002cmp=Yahooctv=Groups1s=Ys2=s3=b=50 

List your web site

in Yahoo! Search.

Yahoo! Groups

How-To Zone
http://us.ard.yahoo.com/SIG=13on4a2p0/M=493064.12117566.12537396.867457
8/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1203534225/L=/B=MM0WGULaX90-/J=12
03527025995303/A=5170407/R=0/SIG=11gfoiqic/*http://advision.webevents.ya
hoo.com/craftsman/ 

Do-It-Yourselfers

Connect  share.

.

http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=103225/stime=1203527025/nc1=4507179/nc2=3848640/nc3=5170407 
 



RE: [flexcoders] Drawing in Panel Insanity

2008-02-19 Thread Merrill, Jason
I thought about that, but it's much further off that what that could
possibly be.  
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 




 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 12:36 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Drawing in Panel Insanity



You're probably not taking in account the panel's border
thickness properties.  When you get the panel's width it's including the
border (not just where the content is being drawn like youre imagining).
To get the true width of the content area youd need to subtract
getStyle(borderThicknessRight) and getStyle(borderThicknessLeft).
Hope this helps
Eric Cancil


On Feb 19, 2008 12:29 PM, Merrill, Jason
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:




So I've been writing an Actionscript component that
extends UIComponent and is wrapped inside a Panel tag.  The UIComponent
has code that draws a flowchart of sorts into the content area of the
Panel, based on a dataprovider it's bound to. Everything works fine
there, and the drawn graphics change when the dataprovider changes
automatically.  The drawn objects also stay within the boundaries of the
Panel content area, thanks to some help on this list with overriding
some protected methods.  
 
The problem I still have though, is getting the drawn
content to stay centered in the content area, including when the Panel
is resized (either by resizing the browser window, since the Panel's
width is 100%, or by moving an HDividedBox divider that separates it
from other panels), or when the drawn content changes size.  I can
measure the size of the drawn content easily enough using the
getBounds() method of Rectangle class, but not the Panel's content area
- the width and height seem to be way off when I measure them.
 
The other problem is getting the scrollbars to be
accurate.  I'm getting really confused by Panel's unscaledWidth,
unscaledHeight, measuredWidth, measuredHeight, width, height,
explicitWidth, and explicitHeight properties and how they all relate to
each other.  Is there someone who can explain how the panel's content
area size is calculated and also the scrollbars?
 
Here is some code snippets from my class:
 
override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void 
{
   super.updateDisplayList(unscaledWidth,
unscaledHeight); 
   reposition();
   measuredWidth = unscaledWidth;
   measuredHeight = unscaledHeight; 
}
 
override protected function measure():void
{
 var rect:Rectangle = getBounds(this);
 measuredWidth = rect.width;
 measuredHeight = rect.height;  
   var flowchartRect:Rectangle =
getBounds(_flowchart);
   _flowchartWidth = flowchartRect.width;
   _flowchartHeight = flowchartRect.height;
}
 
private function reposition(e:Event):void
  {
   measure();
   _flowchart.x = (width/2)-(_flowchart/2);
   _flowchart.y = (height/2)-(_flowchart/2);
  }
 
Thanks,
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 






 



Re: [flexcoders] Drawing in Panel Insanity

2008-02-19 Thread Eric Cancil
You're going to have to account for that either way.

On Feb 19, 2008 12:37 PM, Merrill, Jason [EMAIL PROTECTED]
wrote:

I thought about that, but it's much further off that what that could
 possibly be.


 Jason Merrill
 *Bank of America *
 GTO LLD Solutions Design  Development
 eTools  Multimedia

 *Bank of America Flash Platform Developer Community*

 *Interested in innovative ideas in Learning?
 Check out the* *GTO Innovative Learning 
 Blog*http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
 ** and  
 *subscribe*http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.aspx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLists%2FPosts%2FArchive%2Easpx
 .





  --
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Eric Cancil
 *Sent:* Tuesday, February 19, 2008 12:36 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Drawing in Panel Insanity

  You're probably not taking in account the panel's border thickness
 properties.  When you get the panel's width it's including the border (not
 just where the content is being drawn like youre imagining).  To get the
 true width of the content area youd need to subtract
 getStyle(borderThicknessRight) and getStyle(borderThicknessLeft).
 Hope this helps
 Eric Cancil

 On Feb 19, 2008 12:29 PM, Merrill, Jason [EMAIL PROTECTED]
 wrote:

So I've been writing an Actionscript component that extends
  UIComponent and is wrapped inside a Panel tag.  The UIComponent has code
  that draws a flowchart of sorts into the content area of the Panel, based on
  a dataprovider it's bound to. Everything works fine there, and the drawn
  graphics change when the dataprovider changes automatically.  The drawn
  objects also stay within the boundaries of the Panel content area, thanks to
  some help on this list with overriding some protected methods.
 
  The problem I still have though, is getting the drawn content to stay
  centered in the content area, including when the Panel is resized (either by
  resizing the browser window, since the Panel's width is 100%, or by moving
  an HDividedBox divider that separates it from other panels), or when the
  drawn content changes size.  I can measure the size of the drawn content
  easily enough using the getBounds() method of Rectangle class, but not the
  Panel's content area - the width and height seem to be way off when I
  measure them.
 
  The other problem is getting the scrollbars to be accurate.  I'm getting
  really confused by Panel's unscaledWidth, unscaledHeight, measuredWidth,
  measuredHeight, width, height, explicitWidth, and explicitHeight properties
  and how they all relate to each other.  Is there someone who can explain how
  the panel's content area size is calculated and also the scrollbars?
 
  Here is some code snippets from my class:
 
  override protected function updateDisplayList(unscaledWidth:Number,
  unscaledHeight:Number):void
  {
 super.updateDisplayList(unscaledWidth, unscaledHeight);
 reposition();
 measuredWidth = unscaledWidth;
 measuredHeight = unscaledHeight;
  }
 
  override protected function measure():void
  {
   var rect:Rectangle = getBounds(this);
   measuredWidth = rect.width;
   measuredHeight = rect.height;
 var flowchartRect:Rectangle = getBounds(_flowchart);
 _flowchartWidth = flowchartRect.width;
 _flowchartHeight = flowchartRect.height;
  }
 
  private function reposition(e:Event):void
{
 measure();
 _flowchart.x = (width/2)-(_flowchart/2);
 _flowchart.y = (height/2)-(_flowchart/2);
}
 
  Thanks,
 
 
  Jason Merrill
  *Bank of America *
  GTO LLD Solutions Design  Development
  eTools  Multimedia
 
  *Bank of America Flash Platform Developer Community*
 
  *Interested in innovative ideas in Learning?
  Check out the* *GTO Innovative Learning 
  Blog*http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
  ** and  
  *subscribe*http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.aspx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLists%2FPosts%2FArchive%2Easpx
  .
 

  



RE: [flexcoders] Drawing in Panel Insanity

2008-02-19 Thread Merrill, Jason
I understand, and I'm doing that. ;) 
 
I discovered I was calculating based on the UIComponent's size, and not
the Panel's size, stupid.  Thanks, I almost have it working now.
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 




 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 12:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Drawing in Panel Insanity



You're going to have to account for that either way.


On Feb 19, 2008 12:37 PM, Merrill, Jason
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:




I thought about that, but it's much further off that
what that could possibly be.  
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 




 




From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 12:36 PM
To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Drawing in Panel
Insanity



You're probably not taking in account the
panel's border thickness properties.  When you get the panel's width
it's including the border (not just where the content is being drawn
like youre imagining).  To get the true width of the content area youd
need to subtract getStyle(borderThicknessRight) and
getStyle(borderThicknessLeft).
Hope this helps
Eric Cancil



On Feb 19, 2008 12:29 PM, Merrill, Jason
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:




So I've been writing an Actionscript
component that extends UIComponent and is wrapped inside a Panel tag.
The UIComponent has code that draws a flowchart of sorts into the
content area of the Panel, based on a dataprovider it's bound to.
Everything works fine there, and the drawn graphics change when the
dataprovider changes automatically.  The drawn objects also stay within
the boundaries of the Panel content area, thanks to some help on this
list with overriding some protected methods.  
 
The problem I still have though, is
getting the drawn content to stay centered in the content area,
including when the Panel is resized (either by resizing the browser
window, since the Panel's width is 100%, or by moving an HDividedBox
divider that separates it from other panels), or when the drawn content
changes size.  I can measure the size of the drawn content easily enough
using the getBounds() method of Rectangle class, but not the Panel's
content area - the width and height seem to be way off when I measure
them.
 
The other problem is getting the
scrollbars to be accurate.  I'm getting really confused by Panel's
unscaledWidth, unscaledHeight, measuredWidth, measuredHeight, width,
height, explicitWidth, and explicitHeight properties and how they all
relate to each other.  Is there someone who can explain how the panel's
content area size is calculated and also the scrollbars?
 
Here is some code snippets from my
class:
 
override protected function

Re: [flexcoders] Drawing in Panel Insanity

2008-02-19 Thread Eric Cancil
You're probably not taking in account the panel's border thickness
properties.  When you get the panel's width it's including the border (not
just where the content is being drawn like youre imagining).  To get the
true width of the content area youd need to subtract
getStyle(borderThicknessRight) and getStyle(borderThicknessLeft).
Hope this helps
Eric Cancil

On Feb 19, 2008 12:29 PM, Merrill, Jason [EMAIL PROTECTED]
wrote:

So I've been writing an Actionscript component that extends UIComponent
 and is wrapped inside a Panel tag.  The UIComponent has code that draws a
 flowchart of sorts into the content area of the Panel, based on a
 dataprovider it's bound to. Everything works fine there, and the drawn
 graphics change when the dataprovider changes automatically.  The drawn
 objects also stay within the boundaries of the Panel content area, thanks to
 some help on this list with overriding some protected methods.

 The problem I still have though, is getting the drawn content to stay
 centered in the content area, including when the Panel is resized (either by
 resizing the browser window, since the Panel's width is 100%, or by moving
 an HDividedBox divider that separates it from other panels), or when the
 drawn content changes size.  I can measure the size of the drawn content
 easily enough using the getBounds() method of Rectangle class, but not the
 Panel's content area - the width and height seem to be way off when I
 measure them.

 The other problem is getting the scrollbars to be accurate.  I'm getting
 really confused by Panel's unscaledWidth, unscaledHeight, measuredWidth,
 measuredHeight, width, height, explicitWidth, and explicitHeight properties
 and how they all relate to each other.  Is there someone who can explain how
 the panel's content area size is calculated and also the scrollbars?

 Here is some code snippets from my class:

 override protected function updateDisplayList(unscaledWidth:Number,
 unscaledHeight:Number):void
 {
super.updateDisplayList(unscaledWidth, unscaledHeight);
reposition();
measuredWidth = unscaledWidth;
measuredHeight = unscaledHeight;
 }

 override protected function measure():void
 {
  var rect:Rectangle = getBounds(this);
  measuredWidth = rect.width;
  measuredHeight = rect.height;
var flowchartRect:Rectangle = getBounds(_flowchart);
_flowchartWidth = flowchartRect.width;
_flowchartHeight = flowchartRect.height;
 }

 private function reposition(e:Event):void
   {
measure();
_flowchart.x = (width/2)-(_flowchart/2);
_flowchart.y = (height/2)-(_flowchart/2);
   }

 Thanks,


 Jason Merrill
 *Bank of America *
 GTO LLD Solutions Design  Development
 eTools  Multimedia

 *Bank of America Flash Platform Developer Community*

 *Interested in innovative ideas in Learning?
 Check out the* *GTO Innovative Learning 
 Blog*http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
 ** and  
 *subscribe*http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.aspx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLists%2FPosts%2FArchive%2Easpx
 .
  



RE: [flexcoders] Drawing in Panel Insanity

2008-02-19 Thread Merrill, Jason
Hey Eric, I didn't thank you for your help thanks.  I have it
working now.
 
By the way, is there a way to get the scrollbar's width (for the
vertical scrollbar) and height style (for the horizontal scroll bar) in
the container form of the panel?
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 




 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 12:36 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Drawing in Panel Insanity



You're probably not taking in account the panel's border
thickness properties.  When you get the panel's width it's including the
border (not just where the content is being drawn like youre imagining).
To get the true width of the content area youd need to subtract
getStyle(borderThicknessRight) and getStyle(borderThicknessLeft).
Hope this helps
Eric Cancil


On Feb 19, 2008 12:29 PM, Merrill, Jason
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:




So I've been writing an Actionscript component that
extends UIComponent and is wrapped inside a Panel tag.  The UIComponent
has code that draws a flowchart of sorts into the content area of the
Panel, based on a dataprovider it's bound to. Everything works fine
there, and the drawn graphics change when the dataprovider changes
automatically.  The drawn objects also stay within the boundaries of the
Panel content area, thanks to some help on this list with overriding
some protected methods.  
 
The problem I still have though, is getting the drawn
content to stay centered in the content area, including when the Panel
is resized (either by resizing the browser window, since the Panel's
width is 100%, or by moving an HDividedBox divider that separates it
from other panels), or when the drawn content changes size.  I can
measure the size of the drawn content easily enough using the
getBounds() method of Rectangle class, but not the Panel's content area
- the width and height seem to be way off when I measure them.
 
The other problem is getting the scrollbars to be
accurate.  I'm getting really confused by Panel's unscaledWidth,
unscaledHeight, measuredWidth, measuredHeight, width, height,
explicitWidth, and explicitHeight properties and how they all relate to
each other.  Is there someone who can explain how the panel's content
area size is calculated and also the scrollbars?
 
Here is some code snippets from my class:
 
override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void 
{
   super.updateDisplayList(unscaledWidth,
unscaledHeight); 
   reposition();
   measuredWidth = unscaledWidth;
   measuredHeight = unscaledHeight; 
}
 
override protected function measure():void
{
 var rect:Rectangle = getBounds(this);
 measuredWidth = rect.width;
 measuredHeight = rect.height;  
   var flowchartRect:Rectangle =
getBounds(_flowchart);
   _flowchartWidth = flowchartRect.width;
   _flowchartHeight = flowchartRect.height;
}
 
private function reposition(e:Event):void
  {
   measure();
   _flowchart.x = (width/2)-(_flowchart/2);
   _flowchart.y = (height/2)-(_flowchart/2);
  }
 
Thanks,
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D

Re: [flexcoders] Drawing in Panel Insanity

2008-02-19 Thread Eric Cancil
You can access their height and width directly.
How did you get it working?

On Feb 19, 2008 1:11 PM, Merrill, Jason [EMAIL PROTECTED]
wrote:

Hey Eric, I didn't thank you for your help thanks.  I have it
 working now.

 By the way, is there a way to get the scrollbar's width (for the vertical
 scrollbar) and height style (for the horizontal scroll bar) in the container
 form of the panel?


 Jason Merrill
 *Bank of America *
 GTO LLD Solutions Design  Development
 eTools  Multimedia

 *Bank of America Flash Platform Developer Community*

 *Interested in innovative ideas in Learning?
 Check out the* *GTO Innovative Learning 
 Blog*http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
 ** and  
 *subscribe*http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.aspx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLists%2FPosts%2FArchive%2Easpx
 .





  --
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Eric Cancil
 *Sent:* Tuesday, February 19, 2008 12:36 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Drawing in Panel Insanity

  You're probably not taking in account the panel's border thickness
 properties.  When you get the panel's width it's including the border (not
 just where the content is being drawn like youre imagining).  To get the
 true width of the content area youd need to subtract
 getStyle(borderThicknessRight) and getStyle(borderThicknessLeft).
 Hope this helps
 Eric Cancil

 On Feb 19, 2008 12:29 PM, Merrill, Jason [EMAIL PROTECTED]
 wrote:

So I've been writing an Actionscript component that extends
  UIComponent and is wrapped inside a Panel tag.  The UIComponent has code
  that draws a flowchart of sorts into the content area of the Panel, based on
  a dataprovider it's bound to. Everything works fine there, and the drawn
  graphics change when the dataprovider changes automatically.  The drawn
  objects also stay within the boundaries of the Panel content area, thanks to
  some help on this list with overriding some protected methods.
 
  The problem I still have though, is getting the drawn content to stay
  centered in the content area, including when the Panel is resized (either by
  resizing the browser window, since the Panel's width is 100%, or by moving
  an HDividedBox divider that separates it from other panels), or when the
  drawn content changes size.  I can measure the size of the drawn content
  easily enough using the getBounds() method of Rectangle class, but not the
  Panel's content area - the width and height seem to be way off when I
  measure them.
 
  The other problem is getting the scrollbars to be accurate.  I'm getting
  really confused by Panel's unscaledWidth, unscaledHeight, measuredWidth,
  measuredHeight, width, height, explicitWidth, and explicitHeight properties
  and how they all relate to each other.  Is there someone who can explain how
  the panel's content area size is calculated and also the scrollbars?
 
  Here is some code snippets from my class:
 
  override protected function updateDisplayList(unscaledWidth:Number,
  unscaledHeight:Number):void
  {
 super.updateDisplayList(unscaledWidth, unscaledHeight);
 reposition();
 measuredWidth = unscaledWidth;
 measuredHeight = unscaledHeight;
  }
 
  override protected function measure():void
  {
   var rect:Rectangle = getBounds(this);
   measuredWidth = rect.width;
   measuredHeight = rect.height;
 var flowchartRect:Rectangle = getBounds(_flowchart);
 _flowchartWidth = flowchartRect.width;
 _flowchartHeight = flowchartRect.height;
  }
 
  private function reposition(e:Event):void
{
 measure();
 _flowchart.x = (width/2)-(_flowchart/2);
 _flowchart.y = (height/2)-(_flowchart/2);
}
 
  Thanks,
 
 
  Jason Merrill
  *Bank of America *
  GTO LLD Solutions Design  Development
  eTools  Multimedia
 
  *Bank of America Flash Platform Developer Community*
 
  *Interested in innovative ideas in Learning?
  Check out the* *GTO Innovative Learning 
  Blog*http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
  ** and  
  *subscribe*http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.aspx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLists%2FPosts%2FArchive%2Easpx
  .
 

  



RE: [flexcoders] Drawing in Panel Insanity

2008-02-19 Thread Merrill, Jason
Right, but I mean I can't seem to find the method or properties to find
the panel's scrollbars in the Panel content area - nothing I could find
in the help docs.  
 
Got it working because I made the dumb mistake of calling width on the
UIComponent instead of the panel itself.  
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 




 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 2:50 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Drawing in Panel Insanity



You can access their height and width directly.
How did you get it working?


On Feb 19, 2008 1:11 PM, Merrill, Jason
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:




Hey Eric, I didn't thank you for your help thanks.
I have it working now.
 
By the way, is there a way to get the scrollbar's width
(for the vertical scrollbar) and height style (for the horizontal scroll
bar) in the container form of the panel?
 

Jason Merrill 
Bank of America 
GTO LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community 


Interested in innovative ideas in Learning?
Check out the GTO Innovative Learning Blog
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
and  subscribe
http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx . 




 




From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Eric Cancil
Sent: Tuesday, February 19, 2008 12:36 PM
To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Drawing in Panel
Insanity



You're probably not taking in account the
panel's border thickness properties.  When you get the panel's width
it's including the border (not just where the content is being drawn
like youre imagining).  To get the true width of the content area youd
need to subtract getStyle(borderThicknessRight) and
getStyle(borderThicknessLeft).
Hope this helps
Eric Cancil



On Feb 19, 2008 12:29 PM, Merrill, Jason
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:




So I've been writing an Actionscript
component that extends UIComponent and is wrapped inside a Panel tag.
The UIComponent has code that draws a flowchart of sorts into the
content area of the Panel, based on a dataprovider it's bound to.
Everything works fine there, and the drawn graphics change when the
dataprovider changes automatically.  The drawn objects also stay within
the boundaries of the Panel content area, thanks to some help on this
list with overriding some protected methods.  
 
The problem I still have though, is
getting the drawn content to stay centered in the content area,
including when the Panel is resized (either by resizing the browser
window, since the Panel's width is 100%, or by moving an HDividedBox
divider that separates it from other panels), or when the drawn content
changes size.  I can measure the size of the drawn content easily enough
using the getBounds() method of Rectangle class, but not the Panel's
content area - the width and height seem to be way off when I measure
them.
 
The other problem is getting the
scrollbars to be accurate.  I'm getting really confused by Panel's
unscaledWidth, unscaledHeight, measuredWidth, measuredHeight, width,
height, explicitWidth, and explicitHeight properties and how they all
relate