Recent

Author Topic: Transparent Form under Linux GTK+ 2.0  (Read 5021 times)

jkrX21

  • Newbie
  • Posts: 5
Transparent Form under Linux GTK+ 2.0
« on: January 24, 2007, 03:56:52 pm »
Is it possible to create a transparent form under GTK2 with Lazarus? If yes, how?

I'm planning to port a Windows/Delphi application to Linux/Lazarus, unfortunately it uses transparent forms and I can't seem to find how to make a transparent form under Lazarus.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
RE: Transparent Form under Linux GTK+ 2.0
« Reply #1 on: January 25, 2007, 04:46:55 pm »
not yet. Transperentforms are delphi 7 whie most of the LCL is D6 compatible
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

jkrX21

  • Newbie
  • Posts: 5
RE: Transparent Form under Linux GTK+ 2.0
« Reply #2 on: January 25, 2007, 05:03:19 pm »
Oh. Too bad. But thanks for the info anyway.

Follow-up question: Is there any way to get the X-Window ID of a form in a Lazarus application using the GTK2 interface?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
RE: Transparent Form under Linux GTK+ 2.0
« Reply #3 on: January 25, 2007, 05:25:02 pm »
you can cast a TwinConrol.Handle to a PGKTWidget
from there you can get the ID wih gdk_x11_drawable_get_xid
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

jkrX21

  • Newbie
  • Posts: 5
RE: Transparent Form under Linux GTK+ 2.0
« Reply #4 on: January 26, 2007, 12:49:24 pm »
Marc, thanks.

Where is PGTKWidget defined? Do you have a code snippet on how to do this?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
RE: Transparent Form under Linux GTK+ 2.0
« Reply #5 on: January 30, 2007, 06:22:26 pm »
In one of my testapps, so don't expect nice coding there  :)

http://lazarus.dommelstein.nl/mytest/KeyValue/unit1.pas

in TForm1.DumpOrg,  use the call similar to gdk_window_xdisplay
(a gdkwindow is a gdkdrawable)
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018