[Lazarus] TextHint in TComboBox

Juha Manninen juha.manninen62 at gmail.com
Thu Aug 13 15:15:23 CEST 2020


On Thu, Aug 13, 2020 at 3:23 PM Ondrej Pokorny via lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> If I am not mistaken, TEdit has TextHint-emulation for WidgetSets
> without native support. There is no reason why the same emulation
> shouldn't work with TMemo.

It does not. Actually it never worked. Nobody has tested it maybe
because TMemo.TextHint was not published.
The native support eg. with LCL-QT5 does work.
What happened so far:
The emulated TEdit.TextHint was not updated always. I fixed it :
 https://bugs.freepascal.org/view.php?id=37506
Then I simplified the code in r63725 which broke TMemo's behavior :
 https://bugs.freepascal.org/view.php?id=37553
Then I realized that emulated TMemo.TextHint never worked and disabled
it completely in r63726.
You can test by reverting it. I believe it can be fixed somehow. I
will be happy if you take a look at it.

------ r63726 ------
function TCustomMemo.CanShowEmulatedTextHint: Boolean;
 begin
-  Result :=
-        Assigned(Lines) // CM_EXIT is sent in destroy -> this
function is called in destructor when Lines are already destroyed
-    and (Lines.Count = 0)
-    and inherited CanShowEmulatedTextHint;
+  // CM_EXIT is sent in destroy -> this is called in destructor when
Lines are already destroyed
+  //Result := Assigned(Lines) and inherited CanShowEmulatedTextHint;
+  // ToDo: Make this work. The line above does not work with GTK2 at least.
+  Result := False;
 end;


Juha


More information about the lazarus mailing list