Page 1 of 1

title bar

Posted: Sat Feb 17, 2024 2:51 pm
by Vaytl
Thanks for WebUI4Delphi.
How can I remove the "localhost" caption when loading the window?
OS windows

Re: title bar

Posted: Sat Feb 17, 2024 3:00 pm
by salvadordf
Try setting the document title with JavaScript :

Code: Select all

MyWindow.Run('document.title = "My custom title";');

Re: title bar

Posted: Sat Feb 17, 2024 5:57 pm
by Vaytl
Unfortunately it didn't help.
Image

I understand that this is in the WebUI code itself.

Re: title bar

Posted: Sun Feb 18, 2024 8:32 am
by salvadordf
If you control the page contents you can also use the <title> element in HTML.

Code: Select all

  LMyHTML := '<html><head><title>Page Title</title><script src="webui.js"></script></head> Hello World ! </html>';
  FWindow := TWebUIWindow.Create;
  FWindow.Show(LMyHTML);
If this is not what you need then add an issue with a feature request in the official WebUI project repository at GitHub.
https://github.com/webui-dev/webui

Re: title bar

Posted: Sun Feb 18, 2024 9:43 am
by Vaytl
Added issue https://github.com/webui-dev/webui/issues/327