Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-07

TCanvas Test Code

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Cliff Baeseman

Shane I do not know if this will hep you or not but I am taking a you compile this you can see that I actually am using the gdk methods to set the
window text.

I also belive that should be a good gc reference also.....

Cliff

Sorry guys still didn't get anything done on the web while hashing this one out...

program test;
{$mode objfpc}

uses
glib,
gtk,
gdk,
vclGlobals,

     classes;
var
hWnd : PGtkWidget;
gdWindow: PGdkWindow;
gc: PgdkGC;
begin
  { initialize app level gtk engine }
   gtk_set_locale ();
   { call init and pass no args}
   gtk_init (@argc, @argv);
   {create a window}
   hWnd := gtk_window_new(gtk_window_dialog);
   { set the window policies }
   gtk_window_set_policy (GTK_WINDOW (hWnd), 1, 1, 0);
   {set the title}
   gtk_window_set_title(pGtkWindow(hWnd),'cliffs drawing test');
   {show window}
   gtk_widget_show(hWnd);
   gdWindow := tgtkWidget(hwnd^).window;
   gdk_window_set_title(pGdkWindow(gdWindow),'test');
   {get the window gc}
   gc := gdk_gc_new(PgdkWindow(gdWindow));
   {send process to main loop}
   gtk_main()
end.

Reply by email