Setting a stroke style on a Skinnable container?

I have a SkinnablerContainer skin that I made using the "new skin from copy".  I've got it working with the fill properties included, but I'd also like to add some control for stroke.  I did this, but the component instance says "Cannot resolve attribute 'borderWeight' for component type spark.components.SkinnableContainer".
<fx:Script fb:purpose="styling">
    <![CDATA[        
         *  @private
        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
            bgFill.color = getStyle("backgroundColor");
            bgFill.alpha = getStyle("backgroundAlpha");
               bgStroke.color = getStyle("borderColor");
               bgStroke.weight = getStyle("borderWeight");
            super.updateDisplayList(unscaledWidth, unscaledHeight);
    ]]>       
</fx:Script>
<s:states>
    <s:State name="normal" />
    <s:State name="disabled" />
</s:states>
<s:Rect left="0" right="0" top="0" bottom="0" radiusX="12">
    <s:fill>
        <s:SolidColor id="bgFill"/>
    </s:fill>
     <s:stroke>
          <s:SolidColorStroke id="bgStroke"/>
     </s:stroke>
</s:Rect>

OK, so what component could I use that supports a borderColor? 
Also, in the past I have "made up" my own styles:
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
          minWidth="21" minHeight="21"
          alpha.disabled="0.5">
     <fx:Metadata>
          [HostComponent("spark.components.Button")]
     </fx:Metadata>
     <fx:Script>          
          [Bindable] private var tColor:uint;
          [Bindable] private var tColorOver:uint;
          [Bindable] private var tColorDown:uint;
          [Bindable] private var tColorDisabled:uint = 0xCCCCCC;
          override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
               bgcolor.color = getStyle("backgroundColor");
               bgcolorover.color = getStyle("backgroundOverColor");
               bgcolordown.color = getStyle("backgroundDownColor");
               tColor = getStyle("color");
               tColorOver = getStyle("colorOver");
               tColorDown = getStyle("colorDown");
               super.updateDisplayList(unscaledWidth, unscaledHeight);
     </fx:Script>
     <s:Rect top="0" left="0" right="0" bottom="0" radiusX="6" radiusY="6">
          <s:filters>
               <s:BevelFilter strength=".3" distance="2" blurX="4" blurY="4"/>
          </s:filters>
          <s:filters.down>
               <s:BevelFilter strength=".3" distance="-2" blurX="4" blurY="4"/>
          </s:filters.down>
          <s:fill>
               <s:SolidColor id="bgcolor" />
          </s:fill>
          <s:fill.over>
               <s:SolidColor id="bgcolorover" />
          </s:fill.over>
          <s:fill.down>
               <s:SolidColor id="bgcolordown" />
          </s:fill.down>
     </s:Rect>
Why does it work here?  Or does this only support css and not mxml?

Similar Messages

  • Skinning an extended Skinnable Container

    Hi,
    I'm currently re-developping my website with the new Flex 4 SDK. I'm facing something weird :
    I built a new panel, based on a skinnabled container. A couple of tweaking for the skin, and voilà, a nice look and feel !
    But I'd like to add some more functionnalities : close and refresh button on the right and a toolbar in the middle. So, following what Peter Dehaan posted on his blog, I came up with the following class :
        public class RoundPanel extends SkinnableContainer
            [SkinPart(required="true")]
            public var titleField:TextGraphicElement;
            [SkinPart(required="true")]
            public var headerGroup:Group;
            private var _title:String;
            public function get title():String
                return _title;
            public function set title(v:String):void
                _title = v;
                if (titleField) {
                    titleField.text = title;
            private var _headerContent:Array;
            [ArrayElementType("mx.core.IVisualElement")]
            public function get headerContent():Array
                return _headerContent;
            public function set headerContent(v:Array):void
                _headerContent = v;
                if (headerGroup) {
                    headerGroup.removeAllElements();
                    var idx:int;
                    var len:int = v.length;
                    for (idx = 0; idx <len; idx++) {
                        headerGroup.addElement(v[idx]);
            public function RoundPanel()
                super();
            override protected function partAdded(partName:String, instance:Object) : void
                super.partAdded(partName, instance);
                if (instance == headerGroup) {
                    if (headerGroup) {
                        headerGroup.removeAllElements();
                        var idx:int;
                        var len:int = _headerContent.length;
                        for (idx = 0; idx < len; idx++) {
                            headerGroup.addElement(_headerContent[idx]);
                if (instance == titleField) {
                    titleField.text = title;
            override protected function partRemoved(partName:String, instance:Object) : void
                if (instance == headerGroup) {
                    if (headerGroup) {
                        headerGroup.removeAllElements();
                super.partRemoved(partName, instance);
    And its skin :
    <s:Skin
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:components="components.*">
        <s:states>
            <s:State name="normal" />
            <s:State name="disabled" />
        </s:states>
        <fx:Metadata>
            [HostComponent("components.RoundPanel")]
        </fx:Metadata>
        <s:Rect id="background" left="0" right="0" top="0" bottom="0" radiusX="5" radiusY="5" >
            <s:stroke>
                <s:SolidColorStroke color="#555555" />
            </s:stroke>
            <s:fill>
                <s:LinearGradient rotation="90" >
                    <s:GradientEntry color="0xFFFFFF" />
                    <s:GradientEntry color="0xE8E8E8" />
                </s:LinearGradient>
            </s:fill>           
        </s:Rect>
        <s:Group left="10" top="2">
            <s:layout>
                <s:HorizontalLayout gap="15" />
            </s:layout>
            <s:SimpleText id="titleField" lineBreak="explicit"
                height="30"    verticalAlign="middle" fontWeight="bold">
            </s:SimpleText>
            <s:HGroup gap="0" height="30" id="headerGroup" verticalAlign="middle"/>
        </s:Group>   
        <s:Group id="contentGroup" top="35" width="100%" height="100%" minWidth="0" minHeight="0">
            <s:layout>
                <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10" />
            </s:layout>
        </s:Group>
    </s:Skin>
    I instantiate the component in the main app :
    <components:RoundPanel title="Round Panel" id="panel"
            skinClass="skins.RoundPanelSkin" width="400" height="200">
            <components:headerContent>
                <mx:Label text="HELLO" />
                <mx:Label text="THE" />
                <mx:Label text="WORLD" />
            </components:headerContent>
            <mx:Label text="Bonjour le monde" />
    </components:RoundPanel>
    But I don't get WHY the label "Bonjour le monde" does not show up as the contentGroup of the component.
    Any ideas ?

    I'm having the same problem.
    Each time I declare a class member as being a "SkinPart" I no longer receive SkinnableContainer's, Group instance (contentGroup) in my overridden "partAdded" method. If I comment out the [SkinPart] metatag in my class, contentGroup shows up and so does the content I've added.
    I'm using the same builds as DevSigning and experienced the same netmon issue as well (not a big deal). Friday's build (10146) had issues even resolving SkinnableContainer so that was a no-go.
    Can anyone else share their experience extending SkinnableContainer?
    [UPDATE: After implementing the fix shown in the last comment here: http://forums.adobe.com/message/2007571#2007571 , I was able to get SkinTypes working properly. I should also mention that there are occasions when content would show properly without the fix in place. Could it be some sort of strange timing issue? In the interim, I would recommend simply adding the fix to each class that extends SkinnableContainer.]

  • How do I correct the join in a dotted table stroke style?

    I kept super organized when setting up my table styles this time. I set as many things as possible in the table setup, followed by cell styles for certain columns and certain rows (like subdividers). The problem with cell styles is that you can't set stroke styles BETWEEN cells, only around them. So if there's a setting to do this on the macro level, I'd be really happy. I always get issues with misapplied formatting when I apply too many styles or overrides, so that's what I'm trying to avoid.
    Here's the problem: table styles are still treating my strokes on the individual cell level. I've been using dotted strokes in the columns, but there are no joins between rows. They're aligning to the top and bottom of each cell. See the gray lines in this example (blue dots are bullets, not strokes):
    But when I override the column and re-do the stroke in the Stroke palette, they look as intended. Compare the highlighted cells (black) to the existing table style (white & light gray rows):
    Is there a setting somewhere that I'm missing? Any suggestions besides manual override?
    Note: I'm in CS6 on Mac 10.6, in case it matters.

    I actually need the cell styles. That's what sets my font, spacing, and GREP styles.
    I did find the solution today. In the table style or table setup, I needed to set the "Stroke Drawing Order" to "Column Strokes in Front". Even though it was previously set to "Best Joins" and I had no strokes for rows or for the table borders, it just wasn't giving priority to my dotted columns.
    Thanks for your response though!

  • Make objects with gradient into a stroke style for frames

    Hi Guys,
    I need the frame of the image below as a stroke style (or at least I prefer that above having to copy-paste the elements of the sides 100 times along a frame in my design )
    The thing is: it contains gradients. How do I get the frame to a stroke style so I can easily use it in Illustrator?
    Many Thanks
    Bob

    Hi BobM1990,
    If you are on AICC, you can try using the Image Brushes. You will have to crop the relevant portion of the image and use it appropriately so as to get the desired result.
    You can look for more about image brushes here:
    http://helpx.adobe.com/illustrator/using/images-in-brushes.html
    http://tv.adobe.com/watch/creative-suite-podcast-designers/how-to-use-images-as-brushes-in -adobe-illustrator-cc/
    Regards,
    Dhirendra

  • CS6, setting line weight/style

    How can I set a stroke weight and style as a default so that once set I can continue to draw in that weight and style? For example, in order to draw blades of grass I'd like to set my stroke to a certain thickness and also a predifined color and taper. I don't want to create a bunch of lines, select them all and THEN make the change. I want to draw in "real time", not have to go back later to make changes by either changing the properties or applying a style or brush.
    Setting a default is what I am looking for here.
    Thanks

    Appearance panel: see in the panel menu the setting "New object has basic appearance". This has to be OFF. Then set your appearances and draw on.

  • Border Stroke Style like a Certificate?

    I'd like to find a plug-in (if there is one) that can do the same thing in Illustrator CS4 (for PC) that I can do in Quark: Make a rectangular border (frame or page border) that looks like an engraved diploma or guarantee border. In Quark, you draw a rectangle shape, then go to Item/Modify/Frame/Style and set the style and stroke. There are the usual line widths and dots and borders, as well as fancier stroke styles called "Yearbook," "Certificate," "Deco Plain," etc., which can be dragged to resize; even a very complex design, such as the Certificate that looks a lot like old engraved or guilloche patterns, will adjust to fit perfectly at corners when dragged. Currently, the only way I can create a border like this is to do it in Quark, save as EPS, and then open it in Photoshop. I especially like the Certificate border, and I was hoping when I upgraded from CS2 that Illustrator had included this capability, but it hasn't, so I'm asking if anyone knows about other ways to accomplish this -- even in another Creative Suite program, such as InDesign? I guess it's a "Feature Request," but thanks for any suggestions!

    Okay, now I've had a chance to play around with all the options suggested. Thanks to Larry, too. I had looked at the various brush collections under "borders" and about 3 or 4 were almost what I needed, but the borders provided by Scott, especially the second one, really hit the mark. I spent some time looking at Google results, too, and found a lot of fun brushes for which I've saved bookmarks for future reference.
    Wade, I usually lurk in the forums but this was the first time I'd actually posted -- I didn't know how to mark this answered, and nothing on the screen gave me any hints. But I must have been following a reply link without logging on, because the next time I went to the forum after logging on I saw the option for marking the question answered. Sorry for the confusion.
    Anyway, thanks for all your contributions.
    Nancy

  • Breaking up a stroke & stroke styles

    As you'll see from the attached I have a file with a double lined stroke. I'd like to "break it" (where I've placed a red square) to create space for an object. How do I do that?
    Also, I'd like to experiment with playing with the space between the double line in the stroke. To do this, I thought you needed to go into stroke styles and create a new "stripe" stroke style and play with the space between the two lines with the slider. However, when I do that, I lose the width of my existing stroke and it becomes thinner on both lines. Is there a way to avoid that?
    Thanks!

    Other options for making the gap would be to use the scissor tool, or to draw the shape with the pen tool, leaving the gap.
    Stripe style strokes are built using a percentage of the total stroke weight for each element. You don't set an absolute weight in the style definition. To have a wider gap with the same apparent line widths you need to apply a larger value to the stroke weight.

  • [JS/CS4] What's up with the Stroke Styles?

    Pondering the possibilities of Marc Autret's fantastic ScriptUI Image Injection trick (
    get swatches in dropdown list with color preview... ) I wondered if it was possible to do something a bit more complicated -- a Stroke Style dropdown, with a custom image per stroke style (dashed, dotted, striped), just like the Real Thing. But ... I'm stopped dead in my tracks by one simple nagging problem. Where did the stroke styles go?
    According to my documentation, both Application and Document should have a strokeStyles property, listing all of the available stroke types, and separated dashedStrokeStyles, dottedStrokeStyles, and stripedStrokeStyles properties, to gain access to each of the separate types. However, *all* styles report their length  as "18" and can give me their names but nothing else (dashArray, for example, fails on non-dashed strokes and returns nothing at all for the dashed ones). And the separate lists all seem to have a length of 0. And all of the strokes' "strokeStyleType" ought to return a useful descriptor name but return "" (empty string) instead.
    alert (app.strokeStyles.length); // 18
    alert (app.stripedStrokeStyles.length); // 0!
    alert (app.dashedStrokeStyles.length); // 0!
    alert (app.dottedStrokeStyles.length); // 0!
    Is this my InDesign Gone Bad?

    function(){return A.apply(null,[this].concat($A(arguments)))}
    As far as I know, those 18 styles are built-in styles. You can't delete them, edit or whatever...
    Sure -- but I was hoping to at least see them in a script! It seems I cannot read *any* property out of them ??

  • Set the css style of text in a column according to the value of another col

    I'd like to set the css style of text in a column according to the value of another column. Each field may end up with a different style of text as a result, for instance.
    Any ideas? I looked thru the forums but couldn't find anything.
    Thanks,
    Linda

    Does the class=”t7Header” make it into the rendered HTML?
    ---The text "class="tHeader" does not show but the other text is rendered using the style t7Header as defined in the stylesheet! Exactly what I wanted.
    You might want to use a div or a span instead of a p.
    ---Yes -
    What's very cool is we can create a display column that is dynamically filled with the html and style wrappers based on a lookup to see what style should be applied according to the actual data value. This is critical as our tables are all dynamic so I can't depend on using the additional APEX methods to control the display of a column (as the # of columns in the view vary from instance to instance) and I did not want the display specs to muddy up my SQL queries.
    I wonder why this is not well documented. It is so easy!
    Thanks again for your help.
    Linda

  • AppleScript Pages: How to set "following paragraph style"?

    How do you set "following paragraph style" for paragraphs or paragraph styles using AppleScript?
    I've tried several approaches, and all cause a run-time gag with the netorious error -10000
    More generically, what is the syntax for changing a property of a paragraph style that was user created?
    TIA!

    JonRKibler wrote:
    How do you set "following paragraph style" for paragraphs
    Here's an example that changes the following paragraph style of the first four paragraphs :
    tell application "Pages" to tell front document
          set following paragraph style of paragraphs 1 thru 4 to paragraph style "Heading 1"
    end tell
    JonRKibler wrote:
    How do you set "following paragraph style" for paragraph styles using AppleScript?
    Here's an example that changes the following paragraph style  of the paragraph style "Heading 1" :
    tell application "Pages" to tell front document
          set following paragraph style of paragraph style "Heading 1" to paragraph style "Heading 2"
    end tell
    JonRKibler wrote:
    More generically, what is the syntax for changing a property of a paragraph style that was user created?
    If you know the name of the style, here's an example that changes the value of the space before :
    tell application "Pages" to tell front document
          set space before of paragraph style "xyz" to 14
    end tell

  • OIM-How can i set a password policy which does not contain any space?

    How can i set a password policy which does not contain any space?
    I put space at Characters not allowed but it is not working.
    Can anyone help me out?

    You can go to Settings>Messages and turn off Messages. Then go to Settings>General>Restrictions and turn on the the Restriction that prevent changing accounts.
    I just verified that it works.

  • Stroke styles

    In ID CS3 is there way to have more stroke styles then the standard offerings? I'd like to create a certificate type stroke border. Quark had this available. Is there a cheap or free plug in for this?

    There is no InDesign equivalent to QuarkXPress's rasterized frames or to the Frame Editor application. (Is that still part of QX?)
    You'll have better luck in he Illustrator forums. Also try the
    Illustrator area of the
    Adobe Studio Exchange.

  • MAC | stroke style stipple crashes on test movie/ publish in cs3 cs4

    stroke style stippled crashes when testing movie or trying to publish.
    I have done some tests where I've drawn a random animation of just strokes say 10 frames with a solid style. Then I've used the same animation but changed the style to Stippled (also with edits to that stroke style ie very dense) and it CRASHES when i try to play the movie.
    This is VERY frustrating for such a seemingly simple change on such a basic part of flash!!!!!!
    This problem is on cs4 and I have also check Flash cs3 at my uni and it does exactly the same when i tried the test again (I made a new clean animation just to make sure it wasnt the files falt)so its not a problem with my computor but the software!
    found out this search result with the same problem http://www.actionscript.org/forums/archive/index.php3/t-41241.html so im not the only one...
    is it just on the mac versions?
    This is very anoying as i have a project in on friday and thought this style went with what i was working with

    Like I said, it is hard to be certain.
    As far as I am aware, issues with Snow Leopard are specific to font anomalies in 10.6.7, and the fact that you cannot use the OS's printing system to produce PDFs via File > Print from Adobe applications. Do you have a link or citation for the issues you read online?
    So, reasons to suspect Adobe: running the Adobe installer triggered the problem; Adobe programs crash and they crash in Adobe code;
    Reasons to suspect Apple: it's not a single program crashing; the crashes don't seem to make sense; crashes happen for both CS4 and CS5; crashes affected non-Adobe programs (that is what you meant by "all my programs," right?).
    So, my intuition is you should try an OS reinstall.
    Though even if the root problem is the OS, Adobe probably has some blame here -- Adobe's programs should not crash. So you can certainly take it up with Adobe and hold firm to the line "your program should not crash; why is it crashing" and ultimately they should be able to tell you why (based on the crash report, and perhaps other things). But the answer may turn out to be, "because this Apple subsystem is broken. Fix it and our programs will stop crashing."
    Have you looked at the logs in Console.app? They might shed some additional light.
    Also, since you have recently reinstalled the OS, you are probably in a good position to reinstall the OS. Most people are reluctant to do so because they have a lot of data and applications, and it's a huge pain to preserve them. It sounds like you're not in that position, so doing that reinstall is relatively easy. I would therefore do it just for the peace of mind.
    You can contact Adobe Support at http://www.adobe.com/go/supportportal.

  • Setting the default style sheet

    I am trying to set the default style sheet to my customized css - mainstyle19-en.css. I know that I have to run this command - ant make_main_css -DCOLOR=19 but I don't have ant in my path and it is not recognizing it as a command. How do you put that in the path? Also - where are you supposed to run this command? I know somewhere on the server where the image server is located, but where exactly?
    Thanks for your help,
    Karen.

    In addition, if you are using .net, Sarah Wheeler created a simple portlet that allows the user to create a header portlet with the ability to change the stylesheet. I have modified it a little and would be happy to share my version. Take a look at this thread - http://portal.plumtree.com/portal/server.pt/gateway/PTARGS_0_283309_4352_2758_4823_43/http;/PRODGADGET12.plumtree.com/collab/discussion/app/threadDetails.jsp?projID=39883&forumID=48674&threadID=80810&messageID=80894 (If the link doesn't work, it is located Discussions: Pluggable Nav, Style Sheet Mill, PEI, UI Cust: Changing colors/style sheets with custom header portlets?)
    If you send me an email at [email protected] will send you the code.
    Michael [email protected]

  • STROKE STYLES in cs6

    on the adobe help site they mention STROKE STYLES in cs6 can't find them in the STROKE panel--is adobe's info wrong?

    radarlen,
    I believe this may answer your question:
    http://layersmagazine.com/where-are-my-stroke-styles-in-illustrator.html

Maybe you are looking for

  • HT1199 iTunes unable to open due to DEP

    I am unable to open iTunes after installing due to Data Prevention Execution program preventing it from opening iTunes.  I have clicked on the DEP to allow iTunes to open and restarted the PC, still same problem remains. Your advice on this? Thanks!

  • Connecting ipod to non-macintosh pc

    When I connect my ipod to my PC I am getting the following message: iTunes has detected a Macintosh formatted ipod. You must restore this ipod before you can use it on Windows. My ipod has never been connected to a Macintosh pc and I do not want to l

  • LMS 4.2 Create Portlet from Custom Poller

    Hi folks, I create a custom poller, and would like to add it as a portlet.  I see that histo and live-graph it allow you to configure custom values, but they don't seem to accomplish what I need.  I'd just like a portlet showing the specific output f

  • What is the best process for creating a webi document?

    I inherited a BI 4.0 environment with published repositories, dashboards, and webi documents. For development purposes, I tried creating the webi document local to my machine (due to how slow it was to create the document using BILaunch pad and/or th

  • FC Pro 4.5 & FC Express 3.0 may drop frames with Mac OS X 10.4.9

    Just a heads up: Issue If Mac OS X 10.4.9 is installed, Final Cut Pro 4.5 and Final Cut Express 3.0 may drop frames when attempting to capture video to some FireWire-based storage devices. Final Cut Pro 5 and Final Cut Express 3.5 are not affected by