[gtkada] Remove space between buttons

Reynald Borer reynald.borer at eivd.ch
Fri Jul 1 13:35:44 CEST 2005


Thanks, I've looked at the padding parameters to Attach, they all are at
0. If I put a negative value, then the button disapear.

I'm not sure if it's about the Gtk_Table, because when I put my mouse on
a button it highlight itself with a small purple border. I've updated
the screenshot so you can see what I mean:
http://www.borer.name/files/eivd/screen_button.png

Here is the code used to create one button:
---------------------------------------------
Gtk_New (Window1.Button1_1);
Set_Relief (Window1.Button1_1, Relief_None);
Gtk_New (Window1.Image11 , "gtk-go-up", Gtk_Icon_Size'Val (4));
Set_Alignment (Window1.Image11, 0.5, 0.5);
Set_Padding (Window1.Image11, 0, 0);
Add (Window1.Button1_1, Window1.Image11);
Gtk.Table.Attach (Window1.Table1, Window1.Button1_1,
         Left_Attach  => 0,
         Right_Attach  => 1,
         Top_Attach  => 0,
         Bottom_Attach  => 1,
         Xoptions  => Fill,
         Xpadding  => 0,
         Ypadding  => 0);
Button_Grille.Connect (Window1.Button1_1, "clicked",
Button_Grille.To_Marshaller (On_Button_Clicked'Access), 11);
----------------------------------------------

Bye,

Reynald


Emmanuel Briot wrote:

>
>
> Reynald Borer wrote:
>
>> The empty space is normaly white, but I've changed it to black so that
>> we can see the "problem". In a perfect world, there would be no space
>> between those buttons. Any idea ?? I've tried to look at the reference
>> manual but I've seen nothing in the button properties.
>
>
> The issue is not in the button itself, but in the container that
> contains it. I assume this is a Gtk_Table, by the look of it.
>
> I would look at the Xpadding and Ypadding parameters to Attach.
>
> regards,
> Emmanuel
>

-- 
Reynald Borer <reynald.borer at eivd.ch>
Responsable ravitaillement - AGE-EIVD
http://age.eivd.ch/ - <ravit.age at eivd.ch>




More information about the gtkada mailing list