Recent

Author Topic: TMemo Persistent Selection  (Read 2892 times)

HatForCat

  • Sr. Member
  • ****
  • Posts: 293
TMemo Persistent Selection
« on: April 27, 2017, 07:14:29 pm »
Hi,

Is there any way to have a Memo1.SelText still highlighted when the focus moves away from it?

I am writing a spelling checker and it is working fine with selections etc, but as soon as I click on the Selection listbox for a bad word, the Memo's selected text loses the highlight. The cursor is still positioned in the memo at the start of the bad word, so replacement works fine.

A TDBGrid has "Always show Selection" in Options that keeps the highlight when the focus moves away. Is there some way I can have the memo do that?

Thanks
Acer-i5, 2.6GHz, 6GB, 500GB-SSD, Mint-19.3, Cinnamon Desktop, Lazarus 2.0.6, SQLite3

fred

  • Full Member
  • ***
  • Posts: 201
Re: TMemo Persistent Selection
« Reply #1 on: April 27, 2017, 07:52:11 pm »
Try setting HideSelection to unchecked/false in the property editor.

HatForCat

  • Sr. Member
  • ****
  • Posts: 293
Re: TMemo Persistent Selection
« Reply #2 on: April 27, 2017, 08:11:40 pm »
Try setting HideSelection to unchecked/false in the property editor.

Thanks, but should have mentioned I already have that un-checked. I have noticed that sometimes the memo-selection goes a light-gray, but no idea why it is only sometimes. Quirk of Lazarus and/or Ubuntu I guess. Gray would be OK if it always went gray. :)
Acer-i5, 2.6GHz, 6GB, 500GB-SSD, Mint-19.3, Cinnamon Desktop, Lazarus 2.0.6, SQLite3

fred

  • Full Member
  • ***
  • Posts: 201
Re: TMemo Persistent Selection
« Reply #3 on: April 27, 2017, 08:28:31 pm »
With my little test it works on windows, I don't have a linux version to test  :(
I see you use 1.6.2 perhaps 1.6.4 could work?
I have not cheked the release notes...

HatForCat

  • Sr. Member
  • ****
  • Posts: 293
Re: TMemo Persistent Selection
« Reply #4 on: April 27, 2017, 11:28:12 pm »
I see you use 1.6.2 perhaps 1.6.4 could work?

1.6.4 will not install. I tried it a few weeks back. Keeps throwing errors for paths and missing Dependencies.

Could not be bother messing with it so went back .1.6.2.

Thanks anyway.
Acer-i5, 2.6GHz, 6GB, 500GB-SSD, Mint-19.3, Cinnamon Desktop, Lazarus 2.0.6, SQLite3

fred

  • Full Member
  • ***
  • Posts: 201
Re: TMemo Persistent Selection
« Reply #5 on: April 28, 2017, 10:45:53 am »
Not a real solution but could TRichMemo work?

 

TinyPortal © 2005-2018