Questions about Spark DataGrid (header font Styles, gradient header)

Just starting in 4.5 SDK and just a little confused on the Spark DataGrid.

(1) to set the font style for only the head, but do not see these properties in the designer... as they seem to apply to each part of the data grid.

(2) want to set a linear gradient in the header using two specific colors, alphas, and ratios.  Don't know where to put it now.

I think that's all for now.  What I did with it up to now, I love... but obviously not as many as MX DataGrid user documentation.

Thanks in advance!

Bill

You can do a column header converters by setting the property of the column. But if you want to exchange all the headers, the header is rendered must be specified in the skin. A trick you can do is subclass the Datagridskin and replace the declaration of 'his '. It also works with other parts of the skin.




    

        
        
            
        

    


-Kevin

Tags: Flex

Similar Questions

  • Spark DataGrid header style

    I can't find the styleName for the header part of the Spark DataGrid.

    Can you help me?

    Hello

    Please go through these links, it may be useful for you.

    http://forums.Adobe.com/message/3799266

    http://forums.Adobe.com/message/3819357

    Thank you and best regards,

    ---------------------------------------------------------------------- ----------------------------

    Kanchan Ladwani | [email protected] | www.infocepts.com

    ---------------------------------------------------------------------- ----------------------------

  • Spark Datagrid header of centering

    How could align text in a datagrid header spark in the Center? It seems that he does not accept the styles.

    See our post on the headers here: http://flexponential.com/2011/10/30/changing-fontweight-of-spark-datagrid-headers/. You will need to either change the labelDisplay textAlign property, or remove it and style of the header.

  • Spark Datagrid columnheader click

    Hello!

    With the next Eventlistener I can detect a click on the Spark Datagrid header.

    dg.sortableColumns = false;
    dg.columnHeaderGroup.addEventListener (MouseEvent.CLICK, headerClickListener);
    ……………..
    Event handler header
    private void headerClickListener(event:MouseEvent):void {}
    Alert.Show ("something");

    But how do I detect the current column of the user clicked Headeritem?

    In my view a Build-In Header-Click-event and a Build-In Columnlocking is a "Must Have" of a professional Datagrid.

    Will there be a Flexupdate with a Datagrid improved spark in next time?

    Greetings

    Uwe

    Instead of listening for the GridEvent.GRID_CLICK event. The GridEvent will be the index of the column in it. We return all the events of the mouse on the DataGrid as GridEvents.

    -Kevin

  • How change the style header font in Spark DataGrid?

    I'm looking for the week last for a way to change the font style of the header in a DataGrid of Spark control. It make me crazy that I can't find a way to do this. Have anyone a idea how? Any help is appreciated.

    Thank you

    -Artur

    Hello

    Some styles will not work because some styles of hardcoded in Label text of the DefaultGridHeaderRenderer. You will encounter this problem not only with the DataGrid headers, but also things like title of the Panel and other places where we have the text. To work around this problem is to create your own custom its based on the default and then redefine the part of skin its in the skin.

    First, create a subclass of the DefaultGridHeaderRenderer and twist the "labelDisplay" to your liking (or even just out of all styles and style on your own that you were previously using the name of your custom header rendering engine). Example below (I named it "CustomHeaderRenderer"):

    
    
    
        
    
            
            
        
    
    
    

    Next, create a simple skin of DataGrid by creating a subclass of the spark.skins.spark.DataGridSkin in MXML and setting a new component its in the fx:Declarations section. Example below (I named it "CustomDataGridSkin"):

    
    
    
        
    
            
            
                
            
    
        
    
    
    

    Finally, assign your new skin as the skinClass of your DataGrid (be it in MXML or as a style):

    
        ....
    

    I know it's not pretty, but it is the result of trading off between having fully customized skinning vs having buttons to set all styles. I hope this helps.

    -Kevin

  • two questions about Style sheets

    With the help of RH7, two questions about styles:

    1. I have an older project which seems to act weird. I want to update the styles in our current one important, but seems not to accept it. I can import the file very well, but it doesn't 'take' the formatting (e.g. headers, 'Normal' text, etc.).

    It is important without any errors, and in the list of the topic the new style sheet shows like the style associated with this topic, but I can't find a way to apply new formats. I even tried closing and reopening of HR to see if it was some sort of refresh problem.

    Any thoughts? Is this a problem of corruption?

    2. it seems some of previous authors allowed HR to create of new style sheets for each topic as it has been imported into our system of assistance (from the original Word documents).

    Is there an easy way to globally remove these style sheets and their replacement by a new? My instinct is to:

    1 import the new style.
    2. Select all subjects in the list of topics, right-click to open the properties, and select apply the new style.
    3. use Project Manager tab to remove all the other styles.

    Sounds easy enough, but my concern is to know if HR will apply these changes to the subjects. In addition to my problem in #1 that I met occasionally issues where HR does not seem to apply styles or style changes accurately.

    Thank you

    Hi all

    Note that Styles and Style sheets have an order of priority or hierarchy.

    You can have all the styles declared in a referenced external style sheet and everything is fine. But if the document has styles using the same names, those who will prevail.

    For example, maybe your file CSS says that all title 1 text will make in dark blue to 24 point Arial font. The subject could have statement Heading 1 incorporated, which specifies that the text should be Brown in Verdana 12 point. Even if the subject is properly referencing the external CSS file, the text will be rendered Brown because the embedded style rule will override the CSS rule.

    And what will replace it is if someone text selected and applied the style directly. In this case, you're dealing with a style online.

    One way to help determine if you are dealing with a style incorporated is to simply remove any link to the CSS file? The text seems always the same? If so, you probably deal with a built-in style, or online.

    To check a style incorporated, look at your HTML code for the topic. Search in the region of the head for a (including the tags).

    See you soon... Rick

  • Question of selection with editable Spark DataGrid

    Hello world

    I'm evaluating new Spark DataGrid and I am having a very strange problem with the selection behavior in an editable instance.

    Here is my test application: http://www.playcalliope.com/flex/DataGridSelectionIssue.html (code here: https://gist.github.com/1129160)

    And here are the steps to reproduce the problem:

    1. Select the first cell in the upper left corner of the grid (the one with 'Gabriele');
    2. click it once more, the Editor appears;
    3. now, click on the cell just to the right (the one with "Genta").

    You should see that edition ends as he supposed to do, but the selection is placed on the third cell (the one with a 5 in it) on the one you clicked on. Play a bit with the grid, you will see that this is not the only case, but selection really behaves randomly.

    I use SDK 4.5.1.21328.

    I think that it is a very basic use case... I can't believe that this does not work, what don't get me?

    Thank you very much

    Gabriele Genta

    Message was edited to add the living example

    Your race in a bug known, https://bugs.adobe.com/jira/browse/SDK-30088.

    The bug will be fixed in the Mega version. To work around the bug, you can create a custom editor and delete the "dataGrid.validateNow ()"; call to DataGridEditor.save ().

    Here's how I modified your example to work around the bug:


    http://ns.Adobe.com/MXML/2009.
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx".
    minWidth = "955" = "600" minHeight
    backgroundColor = "#E7E7E7."
    creationComplete = "application1_creationCompleteHandler (event)" > "
       
           
       

       
       
            Import mx.collections.XMLListCollection;
    Import mx.events.FlexEvent;
    protected function application1_creationCompleteHandler(event:FlexEvent):void
    {
    testGrid.dataProvider = new XMLListCollection (testData.item);
    }
    ]]>
       

       
       
           
               
                   
                        1
                        Gabriele
                        Genta
                        5
                        molto
                   

                   
                        10
                        Weill
                        Pallino
                        10
                        poco
                   

               

           

           
           
               
                   
                        Import mx.collections.ICollectionView;
    Import mx.collections.ISort;
                           
    public void save (): Boolean
    {
    If (! validate())

    Returns false;
                               
    newData:Object var = value;
    var property: String = column.dataField;
    Object: data var = data;
    var typeInfo:String = "";
    for each (var variable: XML in describeType (data) .variable)
    {
    If (property == [email protected] ())
    {
    typeInfo = [email protected] ();
    break;
    }
    }
                               
    If (typeInfo is "String")
    {
    If (!) (newData) is String))
    newData = newData.toString ();
    }
    ElseIf (typeInfo == 'As')
    {
    If (!) () newData is uint))
    newData = uint (newData);
    }
    ElseIf (typeInfo == 'int')
    {
    If (!) (newData) is int))
    newData = int (newData);
    }
    ElseIf (typeInfo == "Number")
    {
    If (!) (newData) is number))
    newData = Number (newData);
    }
    ElseIf (typeInfo == "Boolean")
    {
    If (!) (newData) is Boolean))
    {
    var strNewData:String = newData.toString ();
    If (strNewData)
    {
    newData = (strNewData.toLowerCase () == 'true')? true: false;
    }
    }
    }
                               
    If (property & data [property]! == newData)
    {
    If the data is sorted, disable sorting for published data.
    var sort: ISort = null;
    If (dataGrid.dataProvider ICollectionView)
    {
    var dataProvider:ICollectionView = ICollectionView (dataGrid.dataProvider);
    If (dataProvider.sort)
    {
    type = dataProvider.sort;
    dataProvider.sort = null;
    }
    }
                                   
    var oldData:Object = data [well];
    data [property] = newData;
    dataGrid.dataProvider.itemUpdated (data, property, oldData, newData);
                                   
    Restoration of the kind. The data will be not sorted due to this change.
    If (out)
    . Fate ICollectionView (dataGrid.dataProvider) = classification;
    }
                               
    Returns true;
    }
    ]]>
                                   
               
               
           
       
       
       
    Editable = "true" selectionMode = "single-cell".
    itemEditor = "{ClassFactory (MyDefaultEditor) new}" >
           
               
                   
                   
                   
                   
               

           

       

  • The Publisher font Spark datagrid point see through

    I use a default on a spark datagrid item editor.

    When the user attempts to change the old value field is evident.

    How can I get rid of this?

    I use the stuff in the box? Is this a bug listed?

    The code is...

    < s:GridColumn dataField = "Actual" headerText = "Actual" width = "75" editable = "true" >
    < s:itemRenderer >
    < fx:Component >
    < s:DefaultGridItemRenderer textAlign = "right" background = "true" backgroundColor = "#FFFFFF" alpha = "1.0" color = "#000000" / >
    < / fx:Component >
    < / s:itemRenderer >
    < / s:GridColumn >

    Thank you

    Dan pride

    You can use 'opaqueBackground' to define a specific background color. In the following example, I use white color to set the background color of GridItemEditor.

    http://ns.Adobe.com/MXML/2009.
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx".
    clipAndEnableScrolling = 'true '.

    opaqueBackground = "#FFFFFF."
    currentState = "default" >

  • Font styles not saved when downloading site

    It's a bit a strange problem that I have. But basically, whenever I have download my site to the catalyst of business do not show the font styles on my header and footer (both located on my master page) upward, but only on 4 pages. On the home page, everything seems normal, and also when I saw the site in the browser everything seems normal too. It seems that once I host the site, he's starting to have this problem.

    Any help would be greatly appreciated. This is the site I'm working on

    http://wrapsinkpreview2.BusinessCatalyst.com/index.html

    Hi William,.

    This seems very strange question, could be due to corruption in your file.

    Try following the procedure below.

    1. Create a new mask in your file.
    2. Copy all the elements of the old master in it.
    3. Apply to this new form of basis to all your pages.
    4. re - publish your site with the option 'Download all' selected

    Let me know if it works.

    Best regards

    Ankush;

  • HTML (Web), I have a question about the models.

    Hello CC animate developers.

    New features are really good.

    HTML (Web), I have a question about the models.

    <! DOCTYPE html >

    < html >

    < head >

    < meta charset = "UTF-8" >

    < title > $TITLE < /title >

    < meta name = "ad.size" content ="width = $WT, height = $HT" > "

    $CREATEJS_SCRIPTS

    $SCRIPT_START

    var canvas, stage, exportRoot;

    function init() {}

    $CJS_INIT

    }

    $PLAYSOUND

    $SCRIPT_END

    < script type = "text/javascript" >

    "clickTAG" var = "";

    < /script >

    < / head >

    < onload = "init (); the body"style =" background-color: #D4D4D4; " margin: 0px; ">

    < a href = "javascript:window.open (window.clickTag)" >

    < div style = "position: absolute;" cursor: pointer; box-sizing: border-box; border: 1px solid #000000; overflow: hidden; height: $HTpx; Width: $WTpx; Background: rgb (255, 255, 255.0); "> < / div >

    < canvas id = "$CANVAS_ID" width = "$WT" height = "$HT" style = "background-color: $BG" > < / canvas >

    < /a >

    < / body >

    < / html >

    In the example above, the model;

    < Meta name = "ad.siz of" content = "width = $ WTI height = $ HT" > "

    and

    < Div style = "position: absolute;" cursor: pointer; box-sizing: border-box; border: 1px solid # 000000; overflow: hidden; height: $HTpx; Width: $WTpx; Background: rgb (255, 255, 255.0); "> < / div >"

    I use labels. But these tags in the template and import, it gives an error does not occur.

    I think it was a mistake. I want to help in this regard.

    $ HT or Properties $WT , I get an error when I use elsewhere.

    I think I should be able to use anywhere I want.

    The same problem here - I worked around by some DRM models with different values of ad.size, but it's a solution quite short-seight

    Also - you are not able to create the model with transparent background by removing style = "" background-color: $BG ' as it also throws errors - is the only solution that I managed to get updates style = "background-color: $BG; background: none; ", but it's a really bad way of coding things.

    It would be really great to have freedom in changing patterns.

  • [Beginner] Simple question about fontStyle

    Hello world!

    A simple question about fontStyle (ParagraphSyle or paragraph)

    I have seen that fontStyle is for bold, italic and underlined.

    Is it possible to have some bold AND italic or italic AND underlined paragraph? If it is possible how can I do this (for example in javascript)?

    I have found that this type of examples:

    myParagraphStyle.appliedFont = "Arial";
    myParagraphStyle.fontStyle = "Bold";
    myParagraphStyle.pointSize = 24;
    myParagraphStyle.spaceAfter = 24;
    myParagraphStyle.spaceBefore = 24;
    myParagraphStyle.fillColor = myDocument.colors.item ("Red");

    Someone has an idea?

    Afternoon of Goor

    Is it possible to have some bold AND italic or italic AND underlined paragraph? If it is possible how can I do this (for example in javascript)?

    I have found that this type of examples:

    myParagraphStyle.appliedFont = "Arial";
    myParagraphStyle.fontStyle = "Bold";
    myParagraphStyle.pointSize = 24;
    myParagraphStyle.spaceAfter = 24;
    myParagraphStyle.spaceBefore = 24;
    myParagraphStyle.fillColor = myDocument.colors.item ("Red");

    Someone has an idea?

    Each font has its own list of styles - so some fonts will work with "Bold Italic" - some don't.

    Myriad PRO were "Bold Condensed Italic" and "Bold Italic". Some fonts use "Slanted" as "italic".

    Robin

    www.adobescripts.co.UK

  • Satellite L650-11R - a few questions about this

    Hello there :-)

    I have a few questions about my new L650.

    I've never had Toshiba notebook before so I apologize if some of these "quirks" are actually quite normal on this laptop. I really want to hear the views of other users L650.

    1)
    First of all, by the time I turned it on I saw gradient thin (1-2 mm) along the right edge of the screen that goes from the bottom up. Maybe "degraded" isn't the right word, but it seems that since two or three pixels are kind of discoloration or lose brightness/sharpness to the edge along the straight bezel. It is not really that visible, looks like the colors are desaturated a bit here or brightness is a bit lacking. He can be seen everywhere (bios or no color in Windows, but better in the lighter background).
    The left side (or other) seems ok, all this along the right edge is somewhat suspicious. If one can compare? I don't know if it's something to worry about or is just supposed to be like that.

    2)
    The other thing I noticed heating of the processor (Intel i3 330M) and GPU (ATi Mobility Radeon 5650). It's pretty hot here right now (I would say that the temperature is around 28 degrees Celsius when using cell phones). He is sitting on the hard surface (table) and nothing is blocking the vents.
    However, at "rest" (surf the web & regular light stuff), average CPU temp hovers around 58 ° C. It usually goes from 45 to 62 in just a few minutes after starting, and then I can hear and see (Toshiba PC Health Monitor) evacuate the kicks in. Temp goes back to 50 +, event stops and then the temp rises to 60 + until the vent is used again.
    During load full (Prime95 or some games), CPU is going all the way up to 75 degrees (the highest being 77). Fan runs at 75 to 77% during this time, never go faster.

    GPU idling is usually around 5 degrees above temp CPU (62-65). During full load (for example. Benchmark of Far Cry 2), I see a lot of stuttering with the latest drivers Catalyst and DX10 (not sure if the stuttering has something to do with heat), otherwise it is ok (no artifacts or anything like that). Temp of GPU during the loading goes up to 74-75, fan speed is locked at 30%, the frequency of the heart 5650 is 450 MHz. left side of the laptop (vent and below) is pretty hot, while the keyboard is warm (or slightly warmer who who).

    These time seems correct and safe in the long term? I'd rather events works all the time (they aren't really very strong) and keeping time less than 50, but there are just wishful pious bios control events and I can't control not the bios. :-)

    3)
    This is just General related products. :-)
    Official specifications of Toshiba L650 say ATi 5650 (between other low range GPU), but I saw a few specifications calling for there 5730 (same model 11R). Is there really a Satellite L650 with ATi 5730 GPU models?

    Sorry for the long post, I tried to include the best possible description that I could do. :-)

    Thank you in advance.

    Thanks for the additional info!

  • Question about partitions on Equium A100-027

    Hi all!

    I'm new to the forum but have been hidden for a while and he thought at the time that I said "Hello".

    This and the fact that I have a question about my laptop Satellite A100-027.
    The hard drive on my laptop seems to be divided into three partitions = Vista (c) / data (E :) / WinRE (d) with the WinRE (D :) is quite small but others, quite large.))

    My C drive is up to 3 that GB free with about 35 GB of free data (E :) is possible to merge these two to give me a big drive? And if so, how?
    Please excuse my ignorance, but it seems impossible to me to "get my head around" this thing hard drive and would split the a large hard drive.

    Any help would be greatly appreciated and once again, Hello to all.

    Hello

    As the user previous already said, you can manage HARD drive partitions in disk management settings.

    If you n t want to have a data partition (e) then you can try to delete it in disk management.
    Then you can add this empty space of the HARD drive for other partitions on the HARD drive.

    But note; the empty space will be placed at the end of the HARD drive. I don't know if your C partition is placed as a second HARD drive partition, but if so, then it should be no problem to add empty space to partition C (System) of m.

    Concerning

  • Photosmart 7520: Limited Font Styles, prints gibberish to many fonts to Word

    The photosmart 7520 interpret only a few font styles.  Another everthing prints garbage: weird symbols, Arabic.  Included fonts styles can be extended?

    >... is there a way to solve problems and identify the problem?  I'm on wireless communication ...

    My expertise is with printer LaserJet, not inkjet devices;  and I know very little about the problems and wireless protocols.

    So I don't thtink I can provide much useful advice about it, sorry.

    > if I have send the document to the printer, it prints perfectly...

    I guess by that you are referring to the HP ePrint mechanism.

    Still, I'm not familiar with this, but if I understand correctly:

    • You send a document (only certain types are supported) to the e-mail address provided at hpeprint.com
    • Location Server turns your document to an equivalent printer format (i.e. effectively runs through a driver printer residing on this server).
    • Then the printer ready job is sent (not sure of the mechanism) of your device, via your internet router.

    So this may use a different driver on your premises and may also use a different route in your printer.

  • Questions about apps headless

    Hello

    I have questions about the apps without head:

    -It is possible to run or end "game without head" of the apps 'part of the UI "?

    -When headless app is running, the part "headless" have opportunities to perform automatically the part "user interface"?

    -It is possible for "headless" to use geolocation and the sound?

    In advance, thank you for your answers.

    -It is possible to run or end "game without head" of the apps 'part of the UI "?

    Yes

    -When headless app is running, the part "headless" have opportunities to perform automatically the part "user interface"?

    Yes, being the easiest invocation

    -It is possible for "headless" to use geolocation and the sound?

    Yes

Maybe you are looking for