picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.57k stars 325 forks source link

GridView CellFormatting Font not working #2463

Open dreamlyf opened 1 year ago

dreamlyf commented 1 year ago

Eto.Form2.7.3or 2.7.4 GridView CellFormatting Font not working protected override void LogEvents(GridView control) { control.RowHeight = 36;

        var font = Fonts.Serif(18, FontStyle.Italic);
        control.CellFormatting += (sender, e) =>
        {
            //Log.Write(control, "Formatting Row: {1}, Column: {2}, Item: {0}", e.Item, e.Row, control.Columns.IndexOf(e.Column));
            //e.Font = font;                
            e.BackgroundColor = e.Row % 2 == 0 ? Colors.Blue : Colors.LightBlue;
            e.ForegroundColor = e.Row % 2 == 0 ? Colors.Lime : Colors.Yellow;
        };
    }

when 2.5.9 it is working.

cwensley commented 1 year ago

Thanks for reporting the issue! What platform are you seeing this on?

dreamlyf commented 1 year ago

Eto.Test.Gtk + (windows or ubuntu). When the program runs here: Handler.Format(new GtkGridCellFormatEventArgs(this, Handler.Column.Widget, item, Row)); this.Font Becoming “Normal” again