Styling components

Can someone give me some general examples of how to apply
style to components? I already have components on the stage (so not
generating them new from classes in ActionScript). Specifically, I
need to designate the display text for both the checkbox and the
radiobutton.

Okay, found it: you have to style the different elements of a
ComboBox component seperately: the TextField and the DropDown (the
dropdown must use the setRendererStyle method). Like so:
myComboBox.textField.setStyle("textFormat", compFormat);
myComboBox.dropdown.setRendererStyle("textFormat",
compFormat);

Similar Messages

  • Styling lists/item renderers

    Hi,
    I've been using the Flash Builder 4 beta (SDK 10485) for some time and have a pretty good understanding of how styling components work. I've recently migrated a project to a retail copy of Flash Builder and have ran into a few problems regarding lists.
    1: I get hover, clicked and selected states on all lists, indicated by a light blue color. I've yet to figure out how to disable/style this correctly. In the beta I used to just add a custom item renderer but that don't seem to fix the problem anymore (if I want the hover state to be ie. 4 pixels from every corner the light blue shows behind it - see link at the bottom). Have I missed something here? Where are these colors located and how do I disable them?
    2: If I put lists inside of other lists (recommended in SDK 10485 instead of using repeaters) I can no longet scroll the "main" list with my mouse. This used to work in the beta and I have yet to find anything that disable this event, setting scroll policy doesnt seem to help. See example (try scrollong with the wheel over a list inside the main list)
    Quick example:
    http://www.yay.se/flex/list-styling/
    Many thanks in advance.

    Hi,
    This what i managed to do. The outside list has a rollover colour of red and the inside one has one of green. (Scary choice of colours i admit, but it's just an example).
    The itemrenderer code is shown below
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    autoDrawBackground="true" rollOverColor="0xFF0000">
        <s:Rect height="75" width="100"/>
        <s:List width="200" height="100"  dataProvider="{data}" horizontalCenter="0" verticalCenter="0"
                itemRenderer="spark.skins.spark.DefaultItemRenderer" rollOverColor="0X00ff00"/>
    </s:ItemRenderer>
    I was able to scroll both lists but only after clicking to focus. I'm not sure if this is what u are looking for. Do let me know.
    Nishad

  • Changing font in a textarea

    Hey,
    I was wondering how would I code my textarea so that when I choose to change font, it will not change the font of previously entered text.
    Thanks in advance.

    If this "textarea" is a TextArea or a JTextArea or a JTextField, then the answer is that you can't. That tutorial you were shown tells you how to do what you want... the very first paragraph differentiates between "styled" components (what you are asking for) and "unstyled" components (what you have, probably).

  • Displaying Content in Flex - Best Practice

    I'm curious as to people's thoughts for the best methods to
    display content in Flex. In particular, I'm creating a UI and want
    one of the first panels that is displayed to the user to display
    some simple instructions on how to use the UI. Should I import HTML
    from an external file? Should I embed XML or HTML in the SWF? Or,
    should I simply code the content into the SWF? I want the content
    to be styled like the rest of my application - fonts, colors, etc.
    Any suggestions would be greatly appreciated.
    Thank you.

    You can embed the content in the swf (unless you want it to
    change).
    Then you can style it using standard css.
    This way the resulting application is modular, and if you
    change the css in the future, changes are reflected in all your
    styled components.
    More here:
    http://livedocs.adobe.com/flex/1/flex_builder_en/wwhelp/wwhimpl/common/html/wwhelp.htm?con text=Using_Flex_Builder&file=brady510.htm

  • Native Android and iOS Look & Feel with Flex

    Hi. I have recently beena asked to research the use of Flex for development for mobile applications in Android and iOS. What I want to accomplish is the feeling of a native application, both look and feel. Android and iOS are very different in terms of styling components.
    Can this be even be done in Flex?
    Are my goals too high too achieve with Flex?
    Screen shots from Flex, Android, and iOS are below.
    Differences:
    Item
    Android
    iOS
    Tabs Location
    Top
    Bottom
    Top Left Button
    'Up'
    'Back'
    Top Left Button Icon
    Application Icon
    None
    Top Right Button
    Multiple
    Single
    List Item Right Carrot
    No
    Yes
    Adobe Flex Example:
    Native Android Example (Pure Android):
    Native iOS Example:

    This is definitely possible, even easy if you jsut have the time to put into it.
    All you need is an Android Theme - create custom styles for the buttons ect.
    There is a discussion about it here:
    https://issues.apache.org/jira/browse/FLEX-33732
    And it is an open issue so at some point this will probably get incorporated into the SDK.

  • Data grid headers

    I can align text in the body cells of a data grid (using cell
    renderer ) but not the headers( tried to use header Renderer). I
    can format the styles of all cells incuding headers. Any
    ideas?

    Everything you need to know about styling components:
    http://www.flashgods.org/forums/viewtopic.php?f=20&t=76

  • Spec posted: Styling Gumbo Components

    An older specification on styling has been posted to the flex open source site:
    http://opensource.adobe.com/wiki/display/flexsdk/Styling+Gumbo+Components

    I believe all scrolling is smooth scrolling now, it’s up to the scrollbar what increment it will be moving.  I think we discuss this more in the specs.
    On 4/2/09 2:11 AM, "Iwo Banas" <
    [email protected]> wrote:
    A new message was posted by Iwo Banas in
    Developers --
      Spark Virtualization spec posted
    The idea of generic layout virtualization is great!
    I am not sure if it is a correct place but it would be nice if scrolling management could be implemented in a similarly generic way.
    I mean choice between smooth scrolling and jumping the whole items height (or width) like in halo List or DataGrid.
    Do you think it is possible to add such functionality?
    Cheers,
    Iwo Bana¶
    View/reply at Spark Virtualization spec posted <
    http://www.adobeforums.com/webx?13@@.59b8747c/1>
    Replies by email are OK.
    Use the unsubscribe <
    http://www.adobeforums.com/webx?280@@.59b8747c!folder=.3c060fa3>  form to cancel your email subscription.

  • Styling default AS3 components

    Is there any built in way to style portions of the AS3
    components WITHOUT using a skin Class? I want the functionality
    that I had in AS2, where I could say something like
    setStyle("disabledTrackColor",0xCCCCCC); and have the scrollTrack
    be light grey when disabled.

    Varun,
    The best way to style ADF is to look at the generated HTML page for the components you need with resource debugging turned on.
    When you see code like:
    <div id="train" class="af_train">It means it has been translated from
    af|train {/* css */}The transforming rules are quite simple to figure out and a person with good CSS knowledge should get it quickly for all components.
    Regards,
    JP

  • How do I apply programmatic skins for completely custom drawn components of a Flex library project?

    Hello folks,
    I am looking for best practices advice when (1) creating
    custom components and (2) styling and skinning.
    I already know how to skin a component part of the Flex
    framework. I can make a class extending ProgrammaticSkin and have
    my component skinned using CSS to link the component with the
    reference to my custom class.
    However what about those cases when you are completely
    creating a component from scratch?
    Imagine a "Freehand Drawing Canvas" component that allows the
    user to draw on it and has some buttons to set color styles, line
    styles, etc., or imagine a "Screen Flow Gallery" component that
    displays visual objects in a fashion similar to Cover Flow in the
    Mac.
    In many components I am aware you may reuse other components
    part of the Flex framework but I am trying to picture an scenario
    where you would need to draw everything yourself because there just
    isn't something to base it upon so you will end up drawing it from
    scratch.
    To learn how instead of building one of those components I
    mentioned previously I decided to start with something simple that
    would illustrate this like a LiteButton component that will behave
    just like the Flex mx.controls.Button but will extend UIComponent
    and be completely custom drawn.
    The component will have a default look and will also be
    style-able and skin-able. I will provide styles for users of the
    component to modify and regarding skinning anyone can create a
    custom ProgrammaticSkin adding its own drawing logic and link it to
    the component via CSS with the ClassReference applied to the skin
    selector.
    So far so good and it's clear what I want to achieve. I
    actually know how to do most of the stuff here but I have one
    single problem.
    Here is my question, where should I put my custom drawing
    logic? If I do it in the updateDisplayList inside the class
    extending UIComponent it works, however I thought that it would be
    a better practice to do it using programmatic skins, that way I
    could provide different skin themes for my component set.
    The problem is that I can't make the programmatic work in
    this scenario. I tried instantiating the custom programmatic skin
    during the updateDisplayList of the LiteButton component and adding
    it to my display object via addChild but that didn't do anything. I
    also tried creating a "default.css" stylesheet and tried to use
    ClassReference as I would normally do to skin an already existing
    component (or composite component as well) but that didn't do
    anything either.
    So how do I apply programmatic skins for completely custom
    drawn components of my Flex library project?
    I could do it inside the updateDisplayList of the LiteButton
    class extending UIComponent but again I would like to provide
    different theme sets for my components so it makes sense using
    programmatic skins.

    "jbucaran" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hello folks,
    >
    > I am looking for best practices advice when (1) creating
    custom components
    > and
    > (2) styling and skinning.
    >
    > I already know how to skin a component part of the Flex
    framework. I can
    > make
    > a class extending ProgrammaticSkin and have my component
    skinned using CSS
    > to
    > link the component with the reference to my custom
    class.
    >
    > However what about those cases when you are completely
    creating a
    > component
    > from scratch?
    >
    > Imagine a "Freehand Drawing Canvas" component that
    allows the user to draw
    > on
    > it and has some buttons to set color styles, line
    styles, etc., or imagine
    > a
    > "Screen Flow Gallery" component that displays visual
    objects in a fashion
    > similar to Cover Flow in the Mac.
    >
    > In many components I am aware you may reuse other
    components part of the
    > Flex
    > framework but I am trying to picture an scenario where
    you would need to
    > draw
    > everything yourself because there just isn't something
    to base it upon so
    > you
    > will end up drawing it from scratch.
    This may help with that
    http://livedocs.adobe.com/flex/3/html/help.html?content=skinstyle_3.html
    > To learn how instead of building one of those components
    I mentioned
    > previously I decided to start with something simple that
    would illustrate
    > this
    > like a LiteButton component that will behave just like
    the Flex
    > mx.controls.Button but will extend UIComponent and be
    completely custom
    > drawn.
    >
    > The component will have a default look and will also be
    style-able and
    > skin-able. I will provide styles for users of the
    component to modify and
    > regarding skinning anyone can create a custom
    ProgrammaticSkin adding its
    > own
    > drawing logic and link it to the component via CSS with
    the ClassReference
    > applied to the skin selector.
    >
    > So far so good and it's clear what I want to achieve.
    Actually after
    > playing
    > with the weekend and today I know how to do most of the
    stuff but I have
    > one
    > single problem. So here is my question, where should I
    provide my custom
    > drawing logic? If I do it in the updateDisplayList
    inside the class
    > extending
    > UIComponent it works, however I thought that it would be
    a better practice
    > to
    > do it using programmatic skins, that way I could provide
    different skin
    > themes
    > for my component set.
    These aren't mutually exclusive. When you provide a skin with
    a
    TypeSelector, you have to add it to the display list
    somewhere, and this is
    typically done in updateDisplayList or addChildren. I prefer
    to do it in
    updateDisplayList, because you can then change it if the
    style changes.
    > The problem is that I can't make the programmatic work
    in this scenario. I
    > tried instantiating the custom programmatic skin during
    the
    > updateDisplayList
    > of the LiteButton component and adding it to my display
    object via
    > addChild but
    > that didn't do anything.
    Exactly what did you do?
    > I also tried creating a "default.css" stylesheet and
    > tried to use ClassReference as I would normally do to
    skin an already
    > existing
    > component (or composite component as well) but that
    didn't do anything
    > either.
    I've never had any problem using an approach similar to
    this...but I will
    say that I couldn't see any advantage in creating a
    default.css style sheet,
    since it's not really default in the way that the one that
    comes with Flex
    is. It's much more obvious to anyone using your component
    what's going on
    there if you create a style sheet where they're likely to
    spot it.
    > So how do I apply programmatic skins with the default
    look for custom
    > drawn
    > components?
    It seems like your approach is fine, but maybe you've made a
    mistake in your
    implementation.
    > I could do it inside the updateDisplayList of the
    LiteButton class
    > extending
    > UIComponent but again I would like to provide different
    theme sets for my
    > components so it makes sense using programmatic skins.
    You might want to consider also adding an instance of
    HaloBorder to your
    component. That brings a lot of functionality with it.
    HTH;
    Amy

  • How can I use Spark and Mx Components in a NativeWindow?

    Hi,
    First of all, please, excuse my english... I'll try to express in the best way I can...
    I'm working in a AIR application, with Flash, Flex Builder y Action Script 3. I'm creating a new interface, and the main class extends from NativeWindow. The design and look&feel of my application is much different so I plan to create my own components, but I want to use some Spark or mx components and make some skinning or styling.
    When I've tried add some components in the stage of my main class (NativeWindow), the component doesn't appear or a compilation error if a try differents ad bizarre things. After reading and searching a lot. I think that Spark or MX component need a Spark or MX container. I've done some tests and if I add a WindowedApplication, I can use Spark/MX components, but I have two differents "windows": my own window and the Spark window.
    What am I searching? I solution to add Spark/MX components under my NativeWindow and integrate with the rest of my components.
    My main MXML file is:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            xmlns:b="*"
            xmlns:a="com.copmadrid.arioco.window.*"  windowActivate="this.close()">
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
      <a:MainWindow id="ariocoWindow">
      </a:MainWindow>
    </fx:Declarations>
    </s:WindowedApplication>
    In Declarations, I create my own window. If I add Spark/MX components in this file, they're added in another Flex-like window. I have two windows. For this reason I put this.close() to close the Flex Window. It's a trick for the moment.
    Inside <a:MainWindow>, I can't add anything becouse Flex Builder 4 said that I can't add component in declaration - trying to add a component inside the NativeWindow. If I add Spark/MX components in the ActionScript class of MainWindow, even if I add a Spark WindowedApplication, they aren't appear.
    I have to ways, and I'll be very thankful if someone could help me:
    1. How can add in the MXML file Spark/MX components under the MainWindow after the delcaration block. I've searched but I haven't found a way to do it.
    2. Inside de ActionScript class file of MainWindow, add Spark/MX components but I supposse that I have to make an instance of a class that I can add to the stage of MainClase (extends from  NativeWindow) and will be visible there and a valid container for Spark/MX components. I have no idea about which class could be a bridge between NativeWindow and a valid Spark/MX coontainer.
    Thanks in advance! Greetings from Spain!!!

    Spark.components.Window is used for secondary windows.

  • Problem with styling

    I am trying to write a swf that has a variety of buttons to select another swf to load in. One of the SWFs to be loaded contains a list component that has been formated using the StyleManager. The results look good in that SWF; however, when it gets loaded into the parent SWF, all of the buttons in the parent SWF get reformatted. If I drop the StyleManager from the SWF (loaded SWF) and use the following code, nothing gets formatted.
    var tf:TextFormat = new TextFormat();
    tf.font = "Verdana";
    tf.size = 12;
    tf.bold = true;
    tf.color = 0xcccccc;
    vidList.setStyle("textFormat", tf);

    Before I reply, let me just add your summary of the situation so far in an email to myself:
    If you
    successfully style on or components in a SWF and then load that SWF into a
    parent SWF that contains only a UILoader sized the same as the first SWF and its
    source set to the first SWF, all formatting is lost as well as the text that
    would have appeared in those components.
    It seems to me this isn't a problem with styling, its a problem with font embedding.
    From my testing I've found that components in the loaded SWF only lose their font if there is a UIComponent in the parent.
    I haven't been able to find documentation to confirm my theory, but I believe that once the parent has a UI Component it then tries to handle global Fonts, and doesn't immediately have access to Fonts embedded in SWFs it loads. To check this you can actually embed the same font with the same class name into the parent, and you'll find that the font starts working in the loaded SWF.
    This isn't ideal in all situations though - sometimes you want the loaded SWF to handle the font embedding for itself. It appears as though if you register the Font in the loaded SWF, this adds the font to the global register that the parent SWF has access to, and this is all that is required for your font to appear.
    Font.registerFont(ComicSans);

  • Problems skinning/styling ComboBox component

    So the first image is the design brief, and below it is my attempt so far. Some ways to go, and the limitations and scarce documentation of this process is getting to me. So i'm putting a call out to see if anyone's well across this process and could assist, or step me through it?
    been a while since i skinned a component in AS2, and I remember I prefered to write my own components rather than go through this process at the time. but i am hoping to use the built-in Flash component this time.
    So what I need help with is:
    Adjust scrollbar scrubber and track width, hopefully add padding around scrubber, and hopefully this would resolve the issue of losing the scrubber's black border on the right.
    Resolve issues with the combo-button (what's that white border doing there?)
    Style font correctly in combo-button
    Increase list row height
    Add dotted line between list rows
    (I'm ignoring the blue numbers)
    If anyone can help with even just one of those issues, i'd love to hear from you.
    Info about my attempt so far:
    I have skinned several clips, such as scrollThumb*, scrollUpArrow*, scrollDownArrow*, comboDownArrow*, etc.
    I have styled with the following:
    comboBox.setStyle("backgroundColor", 0x504C4B);
    comboBox.dropdown.setStyle("backgroundColor", 0x504C4B);
    comboBox.setStyle("themeColor", 0x1F90AE);
    comboBox.setStyle("color", 0xC4C0BF);
    comboBox.setStyle("textSelectedColor", 0xC4C0BF);
    comboBox.setStyle("textRollOverColor", 0xC4C0BF);
    comboBox.setStyle("alternatingRowColors", [0x504C4B, 0x504C4B]);
    comboBox.setStyle("borderStyle", 'none');
    I have attached the fla I've worked with so far in a zip.
    Thanks for your help!

    Well I resolved this merely by lowering my expectations!
    Leaving this unanswered because I am hoping there must be answers to these issues out there for future reference.
    But for now, my comboBox looks like this:
    And i achieve this by skinning some clips, and adjusting my styling code:
    combo.setStyle("backgroundColor", 0x504C4B);
    combo.dropdown.setStyle("backgroundColor", 0x504C4B);
    combo.setStyle("themeColor", 0x1F90AE);
    combo.setStyle("rollOverColor", 0x46bbda);
    combo.setStyle("color", 0xC4C0BF);
    combo.setStyle("textSelectedColor", 0xFFFFFF);
    combo.setStyle("textRollOverColor", 0xFFFFFF);
    combo.setStyle("alternatingRowColors", [0x504C4B, 0x504C4B]);
    combo.setStyle("borderStyle", 'none');
    combo.text_mc.setStyle("borderStyle","none");
    combo.text_mc.setStyle("themeColor", 0x00FF99);
    combo.text_mc.setStyle("borderColor",0xFFFFFF);
    combo.text_mc.setStyle("color",0xC4C0BF);
    combo.dropdown.setStyle("color",0xC4C0BF);

  • Datagrid styling in Flashbuilder

    Hey everyone,
    I have some issues styling a Datagrid with Flashbuilder.
    My problem is skinning the Datagrid. I wan't to have the Datagrid transparent, which I used to achieve by setting backgroundAlpha="0" and alternatingItemColors="{[]}" in Flexbuilder. This doesn't work when the compiler uses the Spark Theme. The thing is I don't want to use the Halo Theme on all my Components like Peter explains here: http://blog.flexexamples.com/2009/07/14/using-the-halo-theme-in-flex-4/ Is there a way of getting the Datagrid transparent without using the halo theme?
    The second issue I have is regarding fonts in the Datagrid. I managed to embed system fonts like Arial or Verdana, but when it comes to the .ttf the designer wants me to use, no text is displayed. I found out, that the Datagrid uses bold fonts for default. I've set the font-weight to normal on the columns but they still stay empty.
    Here's my css code:
    @font-face
        src:                        url("assets/fonts/FuturaCom-Medium.ttf");
        fontWeight:                 normal;
        fontFamily:                 myFuturaMedium;
        advancedAntiAliasing:       true;
        cff:                        true;
        unicode-range:              U+0020-U+007E,  /* englishRange & basic latin */
                                    U+00A0-U+00FF, /* basic latin with umlaut äöü*/
                                    U+20AC-U+20AC;
    .myDatagrid{
        fontFamily: myFuturaMedium;
        font-weight:normal;
        color: #FFFFFF;   
    Thanks in advance. Help is highly appreciated!

    Or the other approach (a custom skin) would be something like this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/halo"
            backgroundColor="red">
        <s:layout>
            <s:VerticalLayout paddingLeft="20" paddingTop="20" />
        </s:layout>
        <mx:DataGrid id="dataGrid"
                alternatingItemColors="[]"
                borderSkin="skins.CustomBorderSkin">
            <mx:dataProvider>
                <s:ArrayList>
                    <fx:Object c1="0.One" c2="0.Two" />
                    <fx:Object c1="1.One" c2="1.Two" />
                    <fx:Object c1="2.One" c2="2.Two" />
                    <fx:Object c1="3.One" c2="3.Two" />
                    <fx:Object c1="4.One" c2="4.Two" />
                    <fx:Object c1="5.One" c2="5.Two" />
                    <fx:Object c1="6.One" c2="6.Two" />
                    <fx:Object c1="7.One" c2="7.Two" />
                    <fx:Object c1="8.One" c2="8.Two" />
                    <fx:Object c1="9.One" c2="9.Two" />
                </s:ArrayList>
            </mx:dataProvider>
        </mx:DataGrid>
    </s:Application>
    And the custom border skin, skins/CustomBorderSkin.mxml, is as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <local:SparkSkinForHalo xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:local="mx.skins.spark.*" implements="mx.core.IRectangularBorder">
        <fx:Script>
            <![CDATA[
            import mx.core.EdgeMetrics;
            import mx.core.IUIComponent;
            import mx.graphics.RectangularDropShadow;
            /* Define the skin elements that should not be colorized. */
            static private const exclusions:Array = ["background"];
            override public function get colorizeExclusions():Array {return exclusions;}
            /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
            static private const contentFill:Array = ["bgFill"];
            override public function get contentItems():Array {return contentFill};
            /* Define the border item. */
            static private const borderItem:Array = ["borderStroke"];
            override protected function get borderItems():Array {return borderItem;}
            override protected function get defaultBorderItemColor():uint {return 0x696969;}
            static private const metrics:EdgeMetrics = new EdgeMetrics(1, 1, 1, 1);
            private var dropShadow:RectangularDropShadow;
            public function get borderMetrics():EdgeMetrics
                return metrics;
            public function get backgroundImageBounds():Rectangle
                return null;
            public function set backgroundImageBounds(value:Rectangle):void
            public function get hasBackgroundImage():Boolean
                return false;
            public function layoutBackgroundImage():void
            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
                graphics.clear();
                super.updateDisplayList(unscaledWidth, unscaledHeight);
                if (parent && parent is IUIComponent && !IUIComponent(parent).enabled)
                    alpha = 0.5;
                else
                    alpha = 1;
                // Draw drop shadow, if needed
                if (getStyle("dropShadowEnabled") == false ||
                    getStyle("dropShadowEnabled") == "false" ||
                    width == 0 ||
                    height == 0)
                    return;
                // Create a RectangularDropShadow object, set its properties,
                // and draw the shadow
                if (!dropShadow)
                    dropShadow = new RectangularDropShadow();
                dropShadow.distance = 5;
                dropShadow.angle = 90;
                dropShadow.color = 0;
                dropShadow.alpha = 0.8;
                dropShadow.blurX = 20;
                dropShadow.blurY = 20;
                dropShadow.drawShadow(graphics, x, y, width, height);
            private function getDropShadowAngle(distance:Number,
                                                direction:String):Number
                if (direction == "left")
                    return distance >= 0 ? 135 : 225;
                else if (direction == "right")
                    return distance >= 0 ? 45 : 315;
                else // direction == "center"
                    return distance >= 0 ? 90 : 270;
            ]]>
        </fx:Script>
        <s:Group left="0" right="0" top="0" bottom="0">
            <!-- border -->
            <s:Rect left="0" right="0" top="0" bottom="0">
                <s:stroke>           
                    <s:SolidColorStroke id="borderStroke" />
                </s:stroke>
            </s:Rect>
            <!-- fill -->
            <s:Rect id="background" left="1" right="1" top="1" bottom="1" alpha="0">
                <s:fill>
                    <s:SolidColor id="bgFill" color="0xFFFFFF" />
                </s:fill>
            </s:Rect>
        </s:Group>
    </local:SparkSkinForHalo>
    (The border skin was taken from %FLEX SDK%\frameworks\projects\sparkskins\src\mx\skins\spark\BorderSkin.mxml and I basically only added that alpha="0" bit on the background Rect fill.
    This is one of the areas we are still trying to improve in Spark (backgroundImage, backgroundAlpha). If you have any list of styles that worked in Halo but aren't working any more in the default Halo control/container Spark skins, let us know.
    Peter

  • Change the styling of the generated html markup in ADF Faces

    Dear All,
    I just have some question on the generated HTML markup of panelStretchLayout component.
    Supposed I have this layout
    <af:panelStretchLayout id="cntDiv" dimensionsFrom="children" topHeight="auto"
      startWidth="0" endWidth="0">
         <f:facet name="top"/>
         <f:facet name="center"/>
         <f:facet name="bottom"/>                                    
    </af:panelStretchLayout>If you look at the generated html markup it will create a div element with below styling
    <div id="pt1:cntDiv::t" style="position:relative;overflow:hidden;width:100%"/>
    <div id="pt1:cntDiv::c" style="position:relative;overflow:hidden;width:100%"/>
    <div id="pt1:cntDiv::b" style="position:relative;overflow:hidden;width:100%"/>My problem is with the overflow:hidden property. Is there a way or configuration to remove or override this property
    when the markup is generated?
    Use case:
    I wanted to use fancy Jquery sliding menu but everything gets messed up because of this css style property.
    I know you should not mix up JSF with client side components but I need to use those fancy javascript powered menu's.
    Is this possible? If so how?
    Thanks
    JDEV 11g PS5

    Hi there,
    You are saying that you want to use mouse-over. But I think you don't want to use that.
    I've been working with this, and I got it working. However........ Image this: "you have a table with 10 visible rows. You have some buttons below the table. After you select a row (lets say the third) , you might want to navigate to the details by "pushing" a button.
    What will happen with the selected row.......your mouse goes to the button... your mouse has to go over all the rows in the table.... The last row your mouse goes over will be selected.... and these details will be shown. Not the details of the row that you initially selected....
    If you still want this..... I might be able to help you.
    Luc Bors

  • How to create generically styled itemrenderer?

    G'day,
    This is my first dabble with Flex 4, after we have been using Flex 3 for the past two years.
    I want to style an ItemRenderer for a list. That is all cool, and the new state syntax makes it really easy for me to create transitions between states, as well as different styles for different states.
    My problem:
    If the item renderer is used in two different locations in the app, I want the controls within that item renderer to be different, but the styles to be the same. E.g. In a document management system, the list items will want to display an icon, a filename, filesize, and version number, whereas in the Project Management system, I may want to have just the project name and a progress bar depicting how far completed the project is. Both these lists will have the same styles (same background shape, same transitions between states, same padding, etc) but they will house different controls.
    I have read a whole bunch of articles about skinning via google, and a lot of them are starting to blur into one. I am starting to get mixed up about when to use a skin, style, or itemrenderer for a particular rendering task, and which part is responsible for different parts of rendering.
    What I thought the solution would be:
    public class MyRenderer extends SkinnableComponent implements IItemRenderer { ... }
    I set the skinClass of the renderer to the appropriate skin and in that skin, place a 'DataGroup id="contentGroup"', and then a bunch of components inside the renderer. Both modules have their own renderer, but use the same skin. This works in as far as the normal state is rendered in the skin, and the content group is correctly populated with the children of MyRenderer. It does not work in as far as I lose all of the state handling code found inside the ItemRenderer component, so the 'selected' and 'hovered' state are not rendered in the skin. It just sticks with the default state.
    Any help would be greatly appreciated, and I am more than happy to attach some example code if my convoluted explanation is no good : )
    cheers.
    Edit:
    Re: My confusion about skins/styles - I understand that the skin should take care of the components and all aspects of rendering, but I am asking the itemrender to deal with the components and the skin to do the styles. I also realise that this would normally be a job for styling rather than skinning, but the styles I want to share amongst modules are more than what CSS provides (such as transitions between the normal and hovered state).
    Message was edited by: serwylo

    Ok, I have figured out an ugly hack which works. After reading the response to this post: http://forums.adobe.com/message/2370902#2370902, it became clear that ItemRenderers are intentionally not SkinnableComponents. The rational is that the majority of use cases will not need to separate the skin from the component when dealing with item renderers.
    This is fair enough, but to achieve what I want, I needed a skinnable ItemRenderer. I did the unthinkable, and copied the ItemRenderer code. The only change was to extend SkinnableContainer instead of DataRenderer. I then mirrored the componentState with the skinState as per this blog: http://saturnboy.com/2009/09/flex4-component-states-skin-states/ calling invalidateSkinState in a handler for StateChangeEvent.CURRENT_STATE_CHANGE.
    cheers.

Maybe you are looking for

  • Maybe a bug? using  DBMS_XMLGen.ctxHandle;

    Hi all, I use a Oracle 10g Database, and i don't know if the following is a bug or i have done something wrong. I am trying: CREATE OR REPLACE PROCEDURE MAIN.PRUEBA_XML IS v_xml clob; v_ctx DBMS_XMLGen.ctxHandle; doc xmldom.DOMDocument; BEGIN DBMS_LO

  • Using .mov and mp4 in Dreamweaver.

    I know that I can use .Fla for movies or animations in Dreamweaver but it has been noted to me that Mac Ipads and others do not recognize Flash.  Is it possible to use .mov or mp4 in dreamweaver and if so how?   My primary interest in using those for

  • Sharing calenders

    is there a way to share calenders, lists or tasks with another person?

  • Report in currency IDR (Indonsian Rupiah)

    Hi, We have developed many reports for our indian companies. Now we have recently implemented new company for indonsia. As per SAP standard, decimal place for currency IDR is zero and we can not change, we are facing one problem that whenever we are

  • Path to windows shared disk

    Hi, what would be a typical path to mount a windows shared drive as a device? I suppose I have to choose SMB/cifs but then? SHould it look lije this: //SERVERNAME/SHAREDFOLDERNAME or use the IP like this 192.168.5.555/SHAREDFOLDERNAE