8
function newbutton(ALabel : PChar) : PGtkWidget;
11
Result:=gtk_button_new_with_label(ALabel);
12
gtk_widget_show(result);
15
procedure destroy(widget : pGtkWidget ; data: pgpointer ); cdecl;
22
maintable: PgtkWidget;
24
procedure AddToTable(Widget : PGtkWidget;
25
Left,Right, Top,Bottom : guint);
27
gtk_table_attach_defaults (GTK_TABLE(MainTable),Widget,
28
Left,right,top,bottom);
32
gtk_init (@argc, @argv);
33
window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
34
Maintable := gtk_table_new(6,6,True);
35
gtk_widget_show(MainTable);
36
AddToTable(newbutton('1,1 At 1,1'),1,2,1,2);
37
AddToTable(newbutton('2,2 At 3,1'),3,5,1,3);
38
AddToTable(newbutton('4,1 At 4,1'),1,5,4,5);
40
gtk_container_set_border_width(GTK_CONTAINER(Window),5);
41
gtk_container_add(GTK_Container(window),maintable);
42
gtk_signal_connect (PGTKOBJECT (window), 'destroy',
43
GTK_SIGNAL_FUNC (@destroy), NULL);
44
gtk_widget_show (window);