ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2015-06-05 09:58:14

James
Member
Registered: 2015-03-23
Posts: 5

Background Color for Built-in Cell Types

Hi Jing,

Is there a work-around you can suggest for providing a background color for the Check Box built-in cell type, particularly when the rows of the worksheet do have a background color?

Thanks again.
James

Offline

#2 2015-06-05 13:28:40

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Background Color for Built-in Cell Types

OK, I'd like to provide a class that supports colored background instead of using the built-in one, soon.

Jing

Offline

#3 2015-06-06 14:58:49

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Background Color for Built-in Cell Types

Hi James,

Please use the following class instead of built-in one; The version 0.8.8.5 has an incorrect drawing core process with cell body, all cell types (check box, radio box, dropdown and etc.) cannot draw correctly the background color, this problem has been solved in current development version. Please use the following one before the next version get released.

public class BackColorCheckBoxCell : CheckBoxCell
{
  public override void OnPaint(unvell.ReoGrid.RGDrawingContext dc)
  {
    using (var b = new SolidBrush(this.Cell.Style.BackColor))
    {
      dc.PlatformGraphics.FillRectangle(b, this.Bounds);
    }

    base.OnPaint(dc);
  }
}

Thanks, Jing

Offline

#4 2015-06-06 15:34:21

James
Member
Registered: 2015-03-23
Posts: 5

Re: Background Color for Built-in Cell Types

Hi Jing,
Thank-you, much appreciated.
James

Offline

#5 2015-07-13 14:30:48

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Background Color for Built-in Cell Types

You're welcome! The new version 0.8.9 has been released and I think that this problem has also been resolved. It should be no necessary to use workaround classes like BackColorCheckBoxCell.

Offline

Board footer

Powered by FluxBB