« Programmation GTK2 en Pascal/GtkVScale » : différence entre les versions
Contenu supprimé Contenu ajouté
Création (copie de GtkHScale) |
→Programme exemple : Màj source (+ HBox) |
||
Ligne 86 :
TFenetrePrincipale = record
pFenetre : PGtkWidget;
pHBox : PGtkWidget;
pVBox : PGtkWidget;
pCurseur : PGtkWidget;
Ligne 124 ⟶ 125 :
gtk_signal_connect(pGTKOBJECT(pFenPrinc^.pFenetre), 'destroy', GTK_SIGNAL_FUNC(@gtk_main_quit), NULL);
pFenPrinc^.
gtk_container_add(GTK_CONTAINER(pFenPrinc^.pFenetre), pFenPrinc^.
// Création du GtkVScale
Ligne 135 ⟶ 136 :
// Affichage de la valeur à droite
gtk_scale_set_value_pos(GTK_SCALE(pFenPrinc^.pCurseur), GTK_POS_RIGHT);
gtk_box_pack_start(GTK_BOX(pFenPrinc^.
pFenPrinc^.pVBox := gtk_vbox_new(TRUE, 0);
gtk_container_add(GTK_CONTAINER(pFenPrinc^.pHBox), pFenPrinc^.pVBox);
pFenPrinc^.pBouton := gtk_button_new_with_label('Copier');
Ligne 144 ⟶ 148 :
pFenPrinc^.pLabel := gtk_label_new(NULL);
gtk_box_pack_start(GTK_BOX(pFenPrinc^.pVBox), pFenPrinc^.pLabel, TRUE, FALSE, 0);
gtk_widget_show_all(pFenPrinc^.pFenetre);
gtk_main;
|