Recent

Author Topic: Transparent message box  (Read 7369 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3574
    • StrumPract is the musicians best friend
Transparent message box
« on: August 16, 2011, 11:20:22 pm »
Hello everybody.
In a topic :

http://forum.lazarus.freepascal.org/index.php/topic,8653.0.html

It seems that messagedlgpos could be transparent.
But if i write : messagedlgpos.alphablend := true i get a error message:
How can i have a transparent message box ?

Thanks
« Last Edit: August 17, 2011, 11:18:51 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Transparent message box
« Reply #1 on: August 16, 2011, 11:33:51 pm »
I don't know what is messagedlgpos (how it is declared). In the thread is written that TForm can be transparent (but I think that it is not fully cross-platform, at least here on Qt it doesn't work) and only some LCL dialogs are forms.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Elmug

  • Hero Member
  • *****
  • Posts: 849
Re: Transparent message box
« Reply #2 on: August 17, 2011, 02:47:50 am »
Hello everybody.
In a topic :

http://forum.lazarus.freepascal.org/index.php/topic,8653.0.html

It seams that messagedlgpos could be transparent.
But if i write : messagedlgpos.alphablend := true i get a error message:
How can i have a transparent message box ?

Thanks
Hi Fred,

If you want a transparent message, you could use a TLabel.

In the Object Inspector, in the property Color, of the TLabel, selecting ClNone makes the message displayed transparent. The font color can be anything.

Actually, I seem to recall that ClNone is the default.


Fred vS

  • Hero Member
  • *****
  • Posts: 3574
    • StrumPract is the musicians best friend
Re: Transparent message box
« Reply #3 on: August 17, 2011, 11:12:47 pm »
Hello Mr Elmug

Quote
If you want a transparent message, you could use a TLabel.

Hum, i do not understand, a TLabel insteed of Messagedlgpos ?
Do you mean a TLabel on a Tpanel ? But Tpanel have not alphablend property  %)

Thanks

PS: Mr Blaazen i mean Messagedlg or Messagedlgpos

« Last Edit: August 17, 2011, 11:17:42 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Transparent message box
« Reply #4 on: August 17, 2011, 11:56:30 pm »
But Messagedlg or Messagedlgpos are just functions.
You can still design your own dialog. (New Form, button OK, button Cancel etc...)

BTW Transparency for froms does not work here on QT.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Fred vS

  • Hero Member
  • *****
  • Posts: 3574
    • StrumPract is the musicians best friend
Re: Transparent message box
« Reply #5 on: August 18, 2011, 12:03:17 am »
Quote
BTW Transparency for froms does not work here on QT.

Hum, with miXimum compiled with Qt, at loading, i have a beautifull transparent form who becomes "solid" after 3 seconds (a timer change the alphablend value from 255 to 0)...

https://sites.google.com/site/fiensprototyping/

It is working, on my Acer One, with Lazarus 10.10 and 11.04 (other versions not tested)...
« Last Edit: August 18, 2011, 12:10:38 am by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

 

TinyPortal © 2005-2018