|
Post by ptitjoz on Jun 5, 2018 9:58:39 GMT 1
Hello how to align the labels on the left and the entry on the right Are there properties?
Thank you Regards
|
|
|
Post by vovchik on Jun 5, 2018 11:39:34 GMT 1
Dear Ptitjoz, Try this: gtk_misc_set_alignment(widget, 0.0f, 0.5f) where the first argument is a widget, and the second two floats are x and y alignment. I think you can also do this: SETPROPERTY(widget, "xalign", 0.0f) although please look that up to be sure. Check out the gtk docs, too: align. HUG already has gtk_misc_set_alignment included, so you do not have to import it. With kind regards, vovchik
|
|
|
Post by ptitjoz on Jun 5, 2018 13:45:38 GMT 1
Hello vovchik !
Thank you very much for your help !
I aligned the labels on the left and the entry on the right
some lines of code :
Label2 = MARK( "Taux ", 150, 30 ) ATTACH( FenetrePrincipale, Label2, 50, 100 ) SETPROPERTY(Label2, "xalign", 0.0f) : 'aligné à gauche
Entry2 = ENTRY( "3",150, 30 ) FONT(Entry2, "Monospace 12") ATTACH( FenetrePrincipale, Entry2, 200, 100 ) SETPROPERTY(Entry2, "tooltip-text", "taux en % exemple 3,5") :' mettre un infobulle ! SETPROPERTY(Entry2, "xalign", 1.0f) : '1.0 pour aligner à droite
the result :
With my best regards.
|
|
|
Post by vovchik on Jun 5, 2018 19:25:15 GMT 1
Dear ptitjoz,
Great. I see you got everything working properly. The GUI looks nice and clean.
With kind regards, vovchik
|
|
|
Post by ptitjoz on Jun 6, 2018 7:30:05 GMT 1
Dear vovchik, Thank you for these encouragements! yes it's a little program to familiarize me with Bacon. If it might interest someone I put the source code
Sincerely and thank you again! Best regards,
|
|