[lazarus] TCanvas Test Code
Cliff Baeseman
vbman at pcpros.net
Wed Jul 21 01:26:11 EDT 1999
Shane I do not know if this will hep you or not but I am taking a
shot at it.
If 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.
More information about the Lazarus
mailing list