On 11/14/05, Teoti Graphix <[EMAIL PROTECTED]> wrote:

>  Well, kind of. I understand why the Hbox only uses solid inset, outset 
> because of the clip mask right? I think I tried setting the border to 
> something else and the compiler threw an error. I am extending Hbox but, want 
> a border that can be set to whatever borderStyle. The reason is the component 
> I am making uses no clipMasking just the HBox sizing algorithm.

First, there's no clip mask now.  In Flex 2 we use the player's
scrollRect feature to scroll and clip the container's content area.

Secondly, the border actually has nothing to do with clipping.  The
HBox accepts only certain predefined values for borderStyle, and
that's just the way it is.

You can make your HBox-based component accept a new borderStyle, say
"foo", by adding the following metadata to your component's source.

 [Style(name="borderStyle", enumeration="foo", inherit="no")]

If it's an AS file, add it above the class body.  If it's an MXML
component, add it in the mx:Metadata tag.

Also, you can always set the borderStyle to anything you want using AS.

But what you really want is to set the borderSkin style, because you
want control to go into your custom skin class instead of going to
RectBorder.

Example:

 MyBox {
  borderSkin: ClassReference("my.package.MyBorderSkin");
 }


>  This is one thing that would be nice is a way to composite that algorithm so 
> a Flex2 component dev could use the sizing algorithm without all the baggage 
> of the Container class.  Or can you with a utility class already ?

We've thought about separating layout from containers, but for the
time being it's not there.  So your only option is to extend Box.

Manish


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to