ColorScheme.Longhorn NDataGridView issues


Author
Message
Brad Swearingen
Brad Swearingen
Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)
Group: Forum Members
Posts: 53, Visits: 3

I'm setting my color scheme to be longhorn (using the 11.1.17.12 build):

NUIManager.Palette.Scheme = ColorScheme.Longhorn;

 

When I use an NDataGridView I noticed there are two color problems with it:

1) When I click to edit a cell I can't see what I am typing.  The text foreground and the cell background appear both to be white.

2) If I stick a combobox on the cell (such as with the code below) and try to select items from the combo box I can't  see the combo box list items unless I highlight it with the mouse.  Seems the foreground and background color are both white.

DataGridViewComboBoxColumn cmb = new DataGridViewComboBoxColumn();

cmb.HeaderText = "Select Data";

cmb.Name = "cmb";

cmb.MaxDropDownItems = 4;

cmb.Items.Add("True");

cmb.Items.Add("False");

nDataGridView1.Columns.Add(cmb);

3) I also noticed that the mouse cursor I-beam shape over an NTextBox is very hard to see.

We like the longhorn scheme.  Do you have any recommendations on how to fix these issues?  Can these schemes be updated somehow?


Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hello Brad,

Finally, I manage to reproduce the problem.

The reason I couldn't was that my NDataGridView control was hosted in Form instead of NForm.

When you apply a Longhorn palette to the NUIManager, NForm.ForeColor takes its value from it. For Longhorn palette this color is white.
On the other hand the controls hosted in Form or NForm (NForm subclass Form) inherits this property and NDataGridView.DefaultCellStyle.ForeColor takes its value from the form that resides. Therefore NDataGridView.DefaultCellStyle.ForeColor becomes white.

NDataGridView inherits DataGridView and this "feature" comes from base DataGridView control.

As a solution, I can suggest explicitly to set NDataGridView.DefaultCellStyle.ForeColor to Black or other suitable color.

Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search