views:

769

answers:

1

Hello!
I have a simple DataGrid in Flex 3:

<mx:DataGrid width="{indexW - 20}" height="100%"
    headerHeight="0" resizableColumns="false"
    dataProvider="{itemsList}"
    itemClick="itemKlik(event)"
    dataTipFunction="displayTooltip">
    <mx:columns>
     <mx:DataGridColumn id="col1" dataField="title" showDataTips="true"/>

     <mx:DataGridColumn id="col2" width="25" textAlign="left" dataField="index" showDataTips="true"/>

    </mx:columns>
</mx:DataGrid>

I am displaying a tooltip with this function:

private function displayTooltip(item:Object):String{
    var s:String = " ";
    if (item != null){
     s = s + item.title;
    }
    return s;
}

What I want to do is to 'force' my DataGrid to display ERROR TOOLTIPS with 'errorTipRight' option instead of displaying a regular tooltips.
Is there a simple way to accomplish this?

Thanks in advance!

+1  A: 

If you look at this link it might help you with what you are trying to do. In short you want to set the tooltip you created borderStyle property to "errorTipRight". If you want to add more styling, include it in a style definition.

The first example in the link should help you more.

asawilliams
Thanks... I managed to change the look of my tooltip in a way I want only with CSS. But I have a small problem of positioning the same tooltip; I would like to move it just 150px to the right... Is it possible to do it also in CSS or should I use ToolTipManager and such stuff?
errata
when using the createToolTip() method you can specify the x positioning to move it to the right (go to the flex language Reference for more info). that position will be relative to the container it is in.
asawilliams
Thanks for help!
errata