Re: [gtk-list] gtk_box_pack_start() and .._end() functions



Ted Milker wrote:
> 
> Hi, I've just begun working with GTK+ and I don't think I understand the
> naming conventions of the two functions above.  I'm just trying to add
> multiple buttons in a vertical column to a packing box.  Why is it that
> gtk_box_pack_start adds each button below the previous one, while
> gtk_box_pack_end adds each button on top of the previous one.  If you ask
> me, the naming of these functions implies the opposite actions.  I'm sure
> I'm just missing something obvious here.  I'm working with gtk 1.2
> 
> Ted
> 
>
As far as I understand, here is the two purpose of gtk_box_pack_start,
and pack_end : 

Ok, the pack_start, pack the object below the last start_packed, and the
pack_end above the last end_packed widget. 

But, maybe what you're missing is that the start means the first
position of the box (top for vbox, left for hbox), and obviously the
opposite for end_pack!

I'm using these functions, when I want to define a button bar at the
bottom of a vbox : I put all my widgets (lists, menu, ...) with a
start_pack. Then I create a hbox for my button bar. Then I end_pack the
hbox in the vbox, to put it at the bottom of the vbox. 




         -----vbox-----
        | 1            |
        | 2            |
        | 3            |
        |              |
        |--------------|
        ||     hbox   ||
        |--------------|
        |--------------|






Bye


-- 
First they ignore you...Second they laugh at you...
Then they fight you......And then you win!
                                (Ghandi)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]