Ian Branch 127 Posted January 9, 2019 Hi Team, I am updating a piece of code to D10.3 and have reached a confusing point. The original code is.. {code} if ThemesEnabled then DrawElement(Canvas.Handle,GetElementDetails(tebExplorerBarRoot), ClientRect) else .... {code} To this I was getting the message at build time.. "[dcc32 Warning] myprocs.pas(123🙂 W1000 Symbol 'ThemesEnabled' is deprecated: 'Use TCustomStyleServices.Enabled'" So, I changed the code to.. {code} // if ThemesEnabled then if TCustomStyleServices.Enabled then DrawElement(Canvas.Handle,GetElementDetails(tebExplorerBarRoot), ClientRect) else ... {code} Now I get the message.. "[dcc32 Error] myprocs.pas(123😞 E2233 Property 'Enabled' inaccessible here" Clearly I have done something untoward. How should I correct this please? Regards & TIA, Ian Share this post Link to post
Uwe Raabe 2057 Posted January 9, 2019 I am pretty sure that your code is inside a class derived from TCustomStyleServices (unless you are using with). As ThemesEnabled is a member of TCustomStyleServices so is Enabled. Simply change that ThemesEnabled to Enabled and you should be fine. 1 Share this post Link to post
Ian Branch 127 Posted January 10, 2019 Hi Uwe, 100% on the money. They were inside a 'With StyleServices do..' All good now Tks. Regards, Ian Share this post Link to post