Recent

Author Topic: Selecting text with mouse stops when mouse leaves component  (Read 498 times)

dvhx

  • New Member
  • *
  • Posts: 17
I'm using Lazarus 2.2.0+dfsg1-5ubuntu1 (rev Unversioned directory) FPC 3.2.2 x86_64-linux-gtk2

When I select text, when mouse leaves the component (e.g. Memo or Edit) the selection stops updating. I can only select text with mouse if the cursor stays inside the component. In other apps (eg. leafpad text editor which is not written in lazarus) when I press the mouse and start moving cursor, the selection changes even if I leave the window. How to achieve the same in lazarus apps? It makes selecting text difficult.

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Selecting text with mouse stops when mouse leaves component
« Reply #1 on: May 05, 2023, 02:50:16 pm »
TMemo in GTk2 is a native control and you cannot do much here. GTk2 was never my favourite widgetset. You can try to switch to GTk3 but I don't know how mature it is. Selection with mouse out of the control works here (I did a quick test but I have old versions of GTk3 libraries). Qt4 will work for sure but it's a little stranger since whole Ubuntu is GTk based.

Anyway, switching widgeteset can be done in Project Options -> Additions and Overrides; Set "LCLWidgetType".
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: Selecting text with mouse stops when mouse leaves component
« Reply #2 on: May 05, 2023, 03:43:37 pm »
Is this specific to that one Linux distro (or the exact gtk-2 version)? Or is that the same for all distros?

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Selecting text with mouse stops when mouse leaves component
« Reply #3 on: May 05, 2023, 04:48:56 pm »
I have Qt based distro and I can confirm it for GTk2 (2.24). It is fine with GTk3 (3.24). So I guess it is GTk2 specific (not distro specific).
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

 

TinyPortal © 2005-2018