[Lazarus] Gdk Questions

SteveG steveg at nevets.com.au
Wed Sep 17 16:52:42 CEST 2008


Thanks Paulo - could you tell me what version Lazarus you are using ?
I have 0.9.25 (svn 15686) - also on Ubuntu Hardy

I just did a full update of Ubuntu updates and rebooted to be sure
Then created a new project and direct copied the code below to the app - 
fails for me every time at GDK_IS_WINDOW

Your Laz ver may help me track it down, or I will have to find another 
system with Ubuntu for comparison testing

Regards - SteveG


Paulo Malheiros wrote:
> It didn't fail on my Ubuntu Hardy Gtk2. Works fine.
> I used:
>
> implementation
>
> uses gtk2, gdk2;
>
> { TForm1 }
>
> procedure TForm1.Button1Click(Sender: TObject);
> var
>     GdkWindow     :PGdkWindow;
>     GtkWidget     :PGtkWidget;
> begin
>     GtkWidget := pointer( Form1.Handle );
>     GdkWindow := GtkWidget^.window;
>     Memo1.Lines.Add(GtkWidget^.name);
>     if GDK_IS_WINDOW(GdkWindow) then memo1.lines.add('Is Window');
> end;
>
>   



More information about the Lazarus mailing list