Welcome, Guest
  • Author Topic: Change Datagrid.as  (Read 1438 times)

    macromotion

    • Server what's that
    • *
    • Posts: 43
      • View Profile
      • Email
    Change Datagrid.as
    « on: 07/11/06, 09:31 »
    HI friends. I have problem with datagrid. My text color is white and i have enabled the property editable. When i edit the cell, it have the background white and the text white, it's the problem. Studing the DataGrid.as \Classes\mx\controls\DataGrid.as i detect in some line the color of cell when it is editing. How i can change the datagrid.as and use in my application?


    tanks.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Change Datagrid.as
    « Reply #1 on: 07/12/06, 01:45 »
    thre's not property for background when editing. Modify the original class could be dangerous, and also all your movies will inherit the same change. If you try that, copy the class in some way.
    A more simple approach is to change colors when editing, something like:


    listener 
    = {}
    listener.cellFocusIn  = function(evt){
    	
    myGrid.setStyle("color"0xFF0000)
    }
    listener.cellFocusOut = function(evt){
    	
    myGrid.setStyle("color"0xFFFFFF)
    }
    myGrid.addEventListener("cellFocusIn"listener)
    myGrid.addEventListener("cellFocusOut"listener)


    Jorge