Hank
I think the correct solution would be to use a custom skin (programmatic or graphic). Feel free to use my programmatic CSS3Box skin and CSSManager classes or just steal some of the code to create your own custom skin. To get started go to my CSS3Box Explorer and paste the following code into the "Input CSS" field.
.example {
border-color: blue blue green green;
border-width: 5px;
}
That should generate the same result as below with allot less development effort and less cpu usage. It's important to note that these styles aren't recognized by default, but only by the custom classes being used. You can right click on the app to view the source and read more about the classes at my blog entry. Thanks.
Ben Stucki
From: [email protected] [mailto:[email protected]] On Behalf Of hank williams
Sent: Tuesday, July 04, 2006 10:17 AM
To: [email protected]
Subject: Re: [flexcoders] Re: Different borderstyles for HBox
No, there is nothing wrong with using boxes to place borders around components. The issue is that the layering technique where you use four containers to show four different color sides might be a bit wasteful of CPU depending on how much you do it. But it is pretty standard to use boxes with a border color and style.
HankOn 7/4/06, Jonas Windey <[EMAIL PROTECTED] > wrote:
Thanks a lot, that did the trick. So HBoxes shouldn't be used to place a border around components?
From: [email protected] [mailto: [email protected]] On Behalf Of n51red
Sent: dinsdag 4 juli 2006 14:59
To: [email protected]
Subject: [flexcoders] Re: Different borderstyles for HBox
> I remember read a few days ago that these
> invisible components can't be styled.
I seems you've been mislead Carlos. Components like HBox and VBox are
invisible by default, but styles like backgroundColor do work.
Hank's suggestion about using nesting works well (see example), but
has implications for performance if it is used on a large number of
components.
Example code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical" horizontalAlign="center"
verticalAlign="middle">
<mx:Style>
Application{
backgroundColor:white;
color:black;
}
..boxStyle1{
borderStyle:"solid";
borderThickness:5;
borderColor:blue;
borderSides:bottom, left;
}
..boxStyle2{
borderStyle:"solid";
borderThickness:10;
borderColor:green;
borderSides:top, right;
}
</mx:Style>
<mx:VBox id="box"
styleName="boxStyle1"
height="50" width="150">
<mx:VBox height="100%" width="100%"
styleName="boxStyle2"/>
</mx:VBox>
</mx:Application>
--- In [email protected], "Carlos Rovira"
<[EMAIL PROTECTED]> wrote:
>
> Hank,
>
> In general visual containers can be styled, but we are talking
about Layout
> Containers (HBox, VBox,...), and I remember read a few days ago
that these
> invisible components can't be styled.
>
> On 7/4/06, hank williams <[EMAIL PROTECTED]> wrote:
> >
> > Containers can definitely be styled, but I am not sure that you
can
> > assign a different color to different sides. That might require
skinning.
> > You could use scale9 to do it. I know its not as easy as styles,
but I
> > *think* that may be your only option. You can turn off certain
sides and
> > turn on other sides, so perhaps you could do something with
layering, but
> > thats all I can think of.
> >
> > Hank
> >
> > On 7/4/06, Carlos Rovira <[EMAIL PROTECTED]> wrote:
> >
> > > AFAIK, containers for laying out other content can't be styled
> > >
> > >
> > >
> > >
> > > On 7/4/06, Jonas Windey < [EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi, is it possible to give a HBox different border colors
for each
> > > > side? Like border-right: solid 1px #ccc in css?
> > > >
> > > >
> > > >
> > > > Thanks!
> > > >
> > > >
> > >
> > >
> > > --
> > > ::| Carlos Rovira
> > > ::| http://www.carlosrovira.com
> > >
> >
> >
> >
>
>
>
> --
> ::| Carlos Rovira
> ::| http://www.carlosrovira.com
>
__________ NOD32 1.1641 (20060704) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

