Alexey-T / ATFlatControls

Controls for Delphi/Lazarus, used in CudaText: ATTabs, ATButton, ATListbox, ATScrollbar, ATStatusbar, ATGroups, ATGauge
Other
101 stars 29 forks source link

Scrollbar.Theme #59

Closed srd-software closed 3 years ago

srd-software commented 3 years ago

Example of set before I show the ATLBMisspelled ATlistbox: ATLBMisspelled.Theme := @ATFlatThemeEx1; //works ATLBMisspelled.Scrollbar.Theme := @ATSBThemeEx1; //doesn't work, scrollbars don't show

i cannot guess why this dont work, so give the example project which i can edit/fix. how "scrollbars don't show"?? i don't understand...

If I set any ATlist.Scrollbar.Theme to my new scrollbar theme record, they simply fail to show up in that list. If I take that out and don't assign the list's ATlist.Scrollbar.Theme to anything, they show again.

srd-software commented 3 years ago

Alexey,

I tried your demo code and found my problem. I was missing a line in my code:

  >>>theme1:= ATScrollbarTheme; //missing this
  theme1.ColorBG:= clred;
  theme1.ColorThumbFillOver := clWebOrangeRed ;
  List.Theme.ColorBgListbox := clGreen;
  list.Scrollbar.Theme:= @theme1;

NOW I can have different color scrollbar settings on different ATLists, and any ATLists set normally also work. I also added that to the implementation of my new flat theme records as well.

THANKS @Alexey-T