On Sat, 9 Jan 2010 01:07:46 +0100
Kjow <[email protected]> wrote:

> Hi all,
> 
> I need some GTK2 behaviors in my Lazarus application, so I added
> "gtk2" unit to uses... but how to "link" (???) my form with
> "PGtkWindow"?
> 
> e.g. new lazarus application with two buttons on the form:
> _________________________
> 
> unit main;
> 
> {$mode objfpc}{$H+}
> 
> interface
> 
> uses
>    ..., ..., gtk2;
> 
> ...
> ...
> ...
> 
> var
>   Form1: TForm1;
>   window :  PGtkWindow;
> 
> implementation
> 
> { TForm1 }
> 
> procedure TForm1.FormCreate(Sender: TObject);
> begin
>    window :=  gtk_window_new (GTK_WINDOW_TOPLEVEL); ------> it returns
> PGtkWidget, not PGtkWindow
>    //I think I need something that link window to Form1, but I don't
> know how/what...
> end;
> 
> procedure TForm1.Button1Click(Sender: TObject);
> begin
>   gtk_window_fullscreen(window);
> end;
> 
> procedure TForm1.Button2Click(Sender: TObject);
> begin
>   gtk_window_unfullscreen(window);

If you want to make a form full screen under gtk, use:
uses gtkproc;

SetWindowFullScreen(Form1,true);


Mattias

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to