Forum > LCL
TMemo selection after focus loss
sfeinst:
OK. I downloaded the latest from trunk (0.9.29) and I see there is now a HideSelection property. I tried setting the property in the object browser and in code. I tested the value with a showmessage and see it is set to false. But it does not seem to work for me (testing under Windows). When the tmemo loses focus, the selection disappears.
Martin_fr:
Indeed, the feature got broken...
Now that's a catch 22. You have no choice but to use the daily snapshot, but the daily snapshot is broken... (snapshots are explicitly marked as having a high risk of getting broken)
anyway, will be fixed in tomorrows snapshot. (or svn right now)
Or if you do not want to wait, apply below patch:
--- Code: ---Index: win32wsstdctrls.pp
===================================================================
--- win32wsstdctrls.pp (revision 25364)
+++ win32wsstdctrls.pp (revision 25365)
@@ -1249,6 +1249,8 @@
Flags := Flags or ES_AUTOHSCROLL;
if ACustomMemo.BorderStyle = bsSingle then
FlagsEx := FlagsEx or WS_EX_CLIENTEDGE;
+ if not ACustomMemo.HideSelection then
+ Flags := Flags or ES_NOHIDESEL;
pClassName := @EditClsName[0];
WindowTitle := StrCaption;
end;
--- End code ---
sfeinst:
Pulled from SVN. Works fine now thanks.
Navigation
[0] Message Index
[*] Previous page