Results 1 to 2 of 2

Thread: Setting style into object creation

  1. #1
    Join Date
    Feb 2010
    Location
    Sydney, Australia
    Posts
    4

    Default Setting style into object creation

    Hi there,

    I was wondering what would be the recommended way to set up some styles on object declaration.

    I got something like this:

    <object id="priceColumn" class="mx.controls.advancedDataGridClasses.Advance dDataGridColumn">
    ......
    <param name="dataField" value="price"/>
    <method-invocation name="setStyle">
    <arg>textAlign</arg>
    <arg>right</arg>
    </method-invocation>

    </object>

    does this make sense?

    Thanks in advance,
    Diego

  2. #2
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    407

    Default nope

    The setStyle method invocation should work on regular MXML components, but unfortunately the AdvancedDataGridColumn (or DataGridColumn) are an exception. These MXML classes are non-visual, which means that there won't be an Event.ADDED fired for them. Therefore the method-invocation will never take place.
    As of now I wouldn't be able to come up with a work-around for you, I'm sorry. In this case you'll have to set the style statically on the MXML markup.

    cheers,

    Roland

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •