Jump to content
PeterPanettone

Writing if statement in the Code Editor

Recommended Posts

Posted (edited)

In the Code Editor, when typing 'if' followed by a space character, a Hint hides the caret position:

 

image.png.2d8b25f80311866720d9045cf6cf4c56.png

 

...so I cannot see the caret anymore and cannot see what I am typing. I am forced to press the ESC key to hide the hint, which is a completely pointless waste of time.

 

Can anyone confirm this?

 

This has been bothering me for a while now.

 

Isn't there a way to suppress this hint (or show it at a different position) when writing an 'if' statement?

Edited by PeterPanettone

Share this post


Link to post
Posted (edited)

I found the solution:

 

Options -> Language -> Delphi - > Code Insight:

 

image.thumb.png.6485725f56764a17b1952fa97cee8e3f.png

 

Generally, Hints are helpful. But if they hide the caret, they become an annoyance.

 

The ideal position for Hints would be ABOVE THE CARET.

Edited by PeterPanettone

Share this post


Link to post
13 minutes ago, PeterPanettone said:

The ideal position for Hints would be ABOVE THE CARET.

You might file a feature request in the new Quality Portal.

Share this post


Link to post
Posted (edited)
1 hour ago, Uwe Raabe said:

You might file a feature request in the new Quality Portal.

That's what I am going to do. Before doing that, I always ask other people whether they can confirm the issue.

 

So much wasted time because the Embarcadero developers obviously didn't care.

Edited by PeterPanettone
  • Like 2

Share this post


Link to post

Delphi 10.2 Version 25.0.31059.3231

 

If I turn on hints, this is how the hint is displayed:

 

image.png.a836b724fa7e63a35e4c577b5caa26da.png

Share this post


Link to post

So, perhaps a dpi issue? Some system information may be helpful here.

Share this post


Link to post
Posted (edited)

Reproduced in Delphi 12.1 here - turned on hints and see the same thing. The hint window has broken positioning - the bottom of the hint window is where the top should be. 

 

Usually run with scale 125%, switched to 100% and the improper positioning is still there and looks the same. 

 

In addition the hint window should be moved further away or the drop shadow removed as it will obscure text.  

Edited by Brian Evans
  • Thanks 3

Share this post


Link to post
2 hours ago, Uwe Raabe said:

So, perhaps a dpi issue? Some system information may be helpful here.

image.png.0aeb57b25ae6926f554fd11292d0327a.png

Share this post


Link to post
23 hours ago, PeterPanettone said:

In the Code Editor, when typing 'if' followed by a space character, a Hint hides the caret position:

image.png.2d8b25f80311866720d9045cf6cf4c56.png

 

Does it change if you use the dark theme?

Share this post


Link to post
13 minutes ago, Mark- said:

Does it change if you use the dark theme?

 

No, it does not change.

Share this post


Link to post
57 minutes ago, Brian Evans said:

The hint window has broken positioning - the bottom of the hint window is where the top should be.

Aren't hint windows positioned automatically following some system setting?

Share this post


Link to post

Sometimes scale settings more than 100% makes problems. Try it with 100%

Share this post


Link to post
Posted (edited)

Tested with Delphi 11.3 and it looks fine there. Don't have Delphi 12 installed to test with, just Delphi 12.1 and is broken in that release. 

Edited by Brian Evans

Share this post


Link to post
9 minutes ago, Brian Evans said:

Tested with Delphi 11.3 and it looks fine there. Don't have Delphi 12 installed to test with, just Delphi 12.1 and is broken in that release. 

Hi Brian, thanks for testing. Can you please be more specific?

 

1. In Delphi 11.3, how does it "look fine"? Do you mean the caret is also hidden by the Hint in Delphi 11.3? Or do you mean the caret is not hidden by the Hint in Delphi 11.3?

 

2. In Delphi 12.1, what do you mean by "is broken"?

Share this post


Link to post

Looks fine: the top of the hint window is below line of text it is providing a hint for. 

Broken: The bottom of hint the window is where it's top used to be. This causes it to appear on top of the line of text it is providing a hint for. 

 

Share this post


Link to post
On 4/8/2024 at 1:11 AM, Brian Evans said:

Looks fine: the top of the hint window is below line of text it is providing a hint for. 

Broken: The bottom of hint the window is where it's top used to be. This causes it to appear on top of the line of text it is providing a hint for. 

 

You could use a free screenshot tool - there are many available.

Share this post


Link to post

D12.1, 100%, Dark Theme. Broken behavior:

11006165_Bildschirmfoto2024-04-09um16_46_43.png.e723f7568b2b0cbdbcfb11a23e48dea7.png

And there is enough space above and below for the hint to move.

Share this post


Link to post

Some museums exhibit works of art made from Windows error messages. When Delphi has a milestone birthday next year, such a museum could be opened.

Share this post


Link to post
1 hour ago, PeterPanettone said:

You could use a free screenshot tool - there are many available.

SHIFT + Windows key + S, allows to capture a part of the screen via click and drag the mouse.

  • Like 1

Share this post


Link to post
7 minutes ago, Mark- said:

SHIFT + Windows key + S, allows to capture a part of the screen via click and drag the mouse.

This does not work on my secondary monitor, only on the primary monitor.

Share this post


Link to post
1 hour ago, PeterPanettone said:

This does not work on my secondary monitor, only on the primary monitor.

Interesting, works on both monitors, on both computers here. Both computer's monitors, are arranged like this:

image.png.3a10584060d27cfa39fe3e252b770927.png

Share this post


Link to post

Works here even when monitors are side-by-side. Although the frame and toolbar appear on the main monitor, just clicking into the second one shots the second one.

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

×