Recent

Author Topic: [SOLVED] SynEdit hide square selection  (Read 955 times)

SaraT

  • Full Member
  • ***
  • Posts: 135
  • A little student
[SOLVED] SynEdit hide square selection
« on: April 08, 2023, 07:54:58 am »
Hello, Please, take a look at the attached image.
Is it possible to hide the square selection in SynEdit control while selecting text?

I did not find anything in demo files, but maybe someone knows about this.
Many thanks.
« Last Edit: April 08, 2023, 11:04:31 am by SaraT »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11343
  • Debugger - SynEdit - and more
    • wiki
Re: SynEdit hide square selection
« Reply #1 on: April 08, 2023, 09:03:16 am »
What OS / Widgetset do you use?

I have never seen such a square, when I select anything in SynEdit.

SaraT

  • Full Member
  • ***
  • Posts: 135
  • A little student
Re: SynEdit hide square selection
« Reply #2 on: April 08, 2023, 09:28:32 am »
What OS / Widgetset do you use?

I have never seen such a square, when I select anything in SynEdit.

Hi,
This component was tested on Windows 7 and 11 and it is the same result.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11343
  • Debugger - SynEdit - and more
    • wiki
Re: SynEdit hide square selection
« Reply #3 on: April 08, 2023, 10:08:14 am »
Does it also happen when selecting source code in the IDE?

----
To make sure, I understand correct: When you select text, a "square" (rectangle) appears (that was not there before).
On corner of the rectangle follows the mouse-cursor?
This is what you would use to select in "paint" or other image-painting software?

---
You have a new application. And when you place a synedit on the empty form, and then run it => then it will happen? (i.e. paste some text, select and the square appears)


And it does not happen if you select text in notepad, or office/word app?
« Last Edit: April 08, 2023, 10:11:13 am by Martin_fr »

SaraT

  • Full Member
  • ***
  • Posts: 135
  • A little student
Re: SynEdit hide square selection
« Reply #4 on: April 08, 2023, 10:24:39 am »
Does it also happen when selecting source code in the IDE?
...

Hi, yes, the square follows the mouse while I am selecting text.
This square appears in original demos too.
I have not changed anything. It a square by default only in this component :/

This square is not shown in Lazarus IDE in source code or any other editor.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11343
  • Debugger - SynEdit - and more
    • wiki
Re: SynEdit hide square selection
« Reply #5 on: April 08, 2023, 10:37:49 am »
I am on Windows 10. I will have a look at another Win version later.

The SynEdit component doesn't have code to even paint such a "square". So whatever it is, it is a bug somewhere.
Hence, there is no option to switch it.
And hence, to fix it, I must be able to reproduce it.

Also, the source editor is a SynEdit too. So it's curious it is ok there (no square)....

When you get the square, and you move the mouse over the gutter (the line numbers) => Does the square follow all the way?
What if you move the mouse (with button down) outside the SynEdit => does the square follow (extend to outside the SynEdit)?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11343
  • Debugger - SynEdit - and more
    • wiki
Re: SynEdit hide square selection
« Reply #6 on: April 08, 2023, 10:41:36 am »
Also what happens if you press the mouse button over a bit of empty form (not a synedit, not any other component), hold the button and move the mouse. Square or no square?

AlexTP

  • Hero Member
  • *****
  • Posts: 2574
    • UVviewsoft
Re: SynEdit hide square selection
« Reply #7 on: April 08, 2023, 10:44:15 am »
Seems the person was using ATSynEdit. In ATSynEdit, to turn off the selection rect, use property: OptShowMouseSelFrame .

balazsszekely

  • Guest
Re: SynEdit hide square selection
« Reply #8 on: April 08, 2023, 10:46:55 am »
Seems the person was using ATSynEdit. In ATSynEdit, to turn off the selection rect, use property: OptShowMouseSelFrame .
Great you figured out, if true, is a very important detail omitted by OP.
« Last Edit: April 08, 2023, 11:03:31 am by GetMem »

VisualLab

  • Hero Member
  • *****
  • Posts: 686
Re: [SOLVED] SynEdit hide square selection
« Reply #9 on: April 08, 2023, 03:03:41 pm »
I checked the behavior of the TSynEdit component on my computer. When selecting text, lines select correctly, no frame appears. I'm using Lazarus 2.2.4, Windows 10 LTSC.

 

TinyPortal © 2005-2018