Jump to content
Serge_G

Changing Style at runtime and TListview

Recommended Posts

Hi, in my application I offer to the user the possibility to change style (light/dark)

procedure TStartForm.SwitchThemeSwitch(Sender: TObject);
begin
Datas.StyleBookLight.UseStyleManager:=false;
Datas.StyleBookDark.UseStyleManager:=false;
if SwitchTheme.IsChecked then MainForm.StyleBook:=Datas.StyleBookDark
                         else MainForm.StyleBook:=Datas.StyleBookLight;
datas.parametres.blacktheme:=SwitchTheme.IsChecked;
Datas.StyleBookLight.UseStyleManager:=not SwitchTheme.IsChecked;
Datas.StyleBookDark.UseStyleManager:=SwitchTheme.IsChecked;
{TODO -obug -cGeneral :   TListview style don't apply on first lines}
end;

All is working except on my TListView, as you can see. Here I change from light to dark, font text color is still black on these lines, scrolling down the color is the "normal" white 
image.thumb.png.a4b28f776030924e6048f57cac717de1.png

I remember I bang this bug another times, I override this by deactivating and then reactivating the link, but this is time-consuming when there are many records!

Is there another way ?

 

Share this post


Link to post

Hi, this "bug" is corrected in version 11 (and perhaps 10.4, I don't check that)

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×