Profile Picture

What is the Best way to change Header text Color for NGrouper control

Posted By Raul Valle 9 Years Ago

What is the Best way to change Header text Color for NGrouper control

Author
Message
Raul Valle
Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 2, Visits: 11
Hi there,

I new to Nevron. What is the best way to change the Header item text color?

I tried
ctrl.PaletteInheritance = Nevron.UI.WinForm.Controls.PaletteInheritance.None;
ctrl.Palette.ControlText = Color.White;

and works, but it also changes the text color for some other controls like the check boxes.




Nevron Support
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:38 AM
Posts: 3,054, Visits: 4,006
Hi Raul,

You have two options:

After you apply the new ControText on the NGrouper you can set PaletteInheritance to all controls that are contained in the grouper to None, and set their Palette property to NUIManager.Palette:

int count = ctrl.Controls.Count;
for (int i = 0; i < count; i++)

    INPaletteProvider paletteProviderControl = ctrl.Controls[i] as INPaletteProvider;
    if (paletteProviderControl != null)
    {
        paletteProviderControl.PaletteInheritance = PaletteInheritance.None;
        paletteProviderControl.Palette = NUIManager.Palette;
    }
}


The other option is to set the TextFillStyle property of the NGrouper.HeaderItem:

ctrl.HeaderItem.Style.TextFillStyle = new NColorFillStyle(Color.White);



Best Regards,
Nevron Support Team



Raul Valle
Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 2, Visits: 11
Thanks,

The first option worked, the second did not.





Similar Topics


Reading This Topic