Bonjour,

j'ai un problème avec le notebook, j'aimerai lui ajouter un bouton(et un label) pour le fermer,pourtant ca ne marche pas, quand je l'ance l'appli l'onglet est minuscule.

j'ai utilisé une hbox ,et avec un gtk_container_add j'ai ajouté le label puis le bouton.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
        GtkWidget* pHbox_onglet;
	GtkWidget* pImage_onglet;
	GtkWidget* pLabel_onglet;
 
	pHbox_onglet=gtk_hbox_new(FALSE,0);
	pImage_onglet=gtk_image_new_from_file("images/fermer.png");
	pLabel_onglet=gtk_label_new("Onglet");
	gtk_container_add(GTK_CONTAINER(pHbox_onglet),pLabel_onglet);
        gtk_container_add(GTK_CONTAINER(pHbox_onglet),pImage_onglet);
 
     ....
 gtk_notebook_append_page(GTK_NOTEBOOK(pOnglet),pFrame,pHbox_onglet);
	gtk_widget_show_all(pOnglet);
voilà, si vous pouviez m'aider.
merci