Profile Picture

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

Posted By Raul Valle 2 Years Ago

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

Author
Message
Raul Valle
Posted 2 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: Last Year
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 Team
Posted 2 Years Ago
View Quick Profile
Supreme Being

Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)

Group: Moderators
Last Active: 2 days ago @ 8:33 AM
Posts: 2,593, Visits: 2,279
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 2 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: Last Year
Posts: 2, Visits: 11
Thanks,

The first option worked, the second did not.





Similar Topics


Reading This Topic