1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
/* Creation de la GtkHBox */
pHBox = gtk_hbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(Fenetre), pHBox);
/*création et attachement de la table*/
Table=gtk_table_new(45,45,TRUE); /*45lignes et 45 colonnes*/
/******************************* attachement du bonhomme ***********/
Bonhomme = gtk_image_new_from_file("./Bonhomme1.bmp");
gtk_table_attach_defaults(GTK_TABLE(Table),Bonhomme,0,1,0,1);
/*image*/
/*pour la table */
for(i=1;i<44;i++)
{
for (j=0;j<45;j++)
{
Image = gtk_image_new_from_file("./cases_laby/b.bmp");
gtk_table_attach_defaults(GTK_TABLE(Table), Image, i, i+1, j, j+1);/*colonne 0 - 1 ligne 0- 1*/
}
}
gtk_box_pack_start(GTK_BOX(pHBox), Table,TRUE,FALSE,0); |
Partager