[Lazarus] Feature request/inquiry

silvioprog silvioprog at gmail.com
Sun Apr 26 21:17:37 CEST 2015


On Sun, Apr 26, 2015 at 3:18 PM, Dmitry Boyarintsev <
skalogryz.lists at gmail.com> wrote:

> On Sun, Apr 26, 2015 at 1:35 PM, luiz americo pereira camara <
> luizmed at oi.com.br> wrote:
>
>>
>> I implemented here long time ago:
>> https://code.google.com/p/luipack/source/browse/trunk/luicontrols/searchedit.pas
>>
>> If agreed i can add to LCL as TEdit.TextHint
>>
>
> Two notes here:
>
> #1
> for the case of TSearchEdit - it should be (optionally) a stand alone
> widget, rather than a hard-coded pure LCL control.
> otherwise it would not be rendered properly for OSX
>
> https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/ControlsText.html#//apple_ref/doc/uid/20000957-CH51-SW5
>
> and maybe (https://developer.gnome.org/gtk3/stable/GtkSearchBar.html)
> gtk3 ?
>
> Win32 as well as Qt doesn't seem to have "native" controls, thus having
> LCL-level wrapper is a good solution for them.
>
> #2
> Is luipack being moved to other source hosting service? (i.e. github,
> sourceforge). code.google is closing.
>
> thanks,
> Dmitry
>

In Windows:

uses
  Windows;

procedure TForm1.FormCreate(Sender: TObject);
const
  ECM_FIRST = $1500;
  EM_SETCUEBANNER = ECM_FIRST + 1;
begin
  SendMessage(Edit1.Handle, EM_SETCUEBANNER, 0,
    LParam(PWideChar(WideString('My placeholder on Windows'))));
end;

I implemented this feature in an old project that I maintain, LazSolutions,
and it was cross-platform.

-- 
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150426/e234cbe5/attachment-0003.html>


More information about the Lazarus mailing list