Jud 2 Posted October 3 Delphi 13 is not greying out inactive code in IFDEFs that are not on. I looked for an option for this but I couldn't find it. Is there an option for greying out inactive code? Share this post Link to post
DelphiUdIT 268 Posted October 3 No options, It is automatic. Try to close the Unit and reopen it again. Somtimes you must close the Project and reopen again. Another options is to do a build: I see that after the build "normally" all things works. All of this depends where the "definition" is declared: is it in Project options ? Or in one unit of the Project ? Or in one unit outisde the Project ? There is this topic too: https://en.delphipraxis.net/topic/13722-define-conditional-symbol-in-dpr/?do=findComment&comment=105371 Share this post Link to post
Jud 2 Posted October 3 (edited) Thanks. I tried closing the project. I looked in two other projects. I did a build. Nothing fixed it. The other two projects had the same problem. I think it was working the other day. The DEFINEs are in the source code of the unit. It does ignore the code, but it doesn't grey it out. Edited October 3 by Jud Share this post Link to post
Remy Lebeau 1675 Posted Saturday at 07:53 PM On 10/3/2025 at 12:10 PM, Jud said: I think it was working the other day. So you are saying it was working the other day in 13 and now its not? Or, were you using an older version before and then upgraded to 13 and it stopped working? Share this post Link to post
Jud 2 Posted Saturday at 11:28 PM I thought it was working the other day, but I'm not certain. I just noticed that it wasn't working yesterday. I was using 12.3 and installed 13.0. It is still working in 12.3 (same computer). Share this post Link to post
Angus Robertson 691 Posted Sunday at 08:33 AM Greying out suppressed code is working as expected in D13 for the ICS component library. ICS has a lot of defines and optional code, greying is a very useful feature. Angus Share this post Link to post
Uwe Raabe 2226 Posted Sunday at 09:08 AM It does not work when the Code Insight Manager is set to Classic Code Insight, but that is expected. Share this post Link to post
Jud 2 Posted Sunday at 04:24 PM 7 hours ago, Uwe Raabe said: It does not work when the Code Insight Manager is set to Classic Code Insight, but that is expected. Thanks, that was the problem! I had "none" selected. I turned off a lot of this stuff because it is so annoying for it to add "True then" every time I type "if". Share this post Link to post
Remy Lebeau 1675 Posted Sunday at 04:56 PM 31 minutes ago, Jud said: I turned off a lot of this stuff because it is so annoying for it to add "True then" every time I type "if". https://en.delphipraxis.net/topic/7289-line-break-after-i-type-if/ Share this post Link to post