dumb question about VBox.Pack{Start,End}

34 views
Skip to first unread message

david j

unread,
Jun 5, 2017, 5:33:29 PM6/5/17
to XWT Widget Toolkit
I have what seems like a dumb question..

Why does VBox.PackStart() seem to add items to the end of a list, and VBox.PackEnd() add items to the beginning of the list?

For example, if I do this:

 var topPanel = new VBox();
 topPanel.PackEnd(new Label("First Label"));
 topPanel.PackEnd(new Label("Second Label"));    

The window shows:

Second Label
First Label

Vladimir Dimitrov

unread,
Jun 6, 2017, 2:54:44 AM6/6/17
to XWT Widget Toolkit
Imagine there are two stacks of child elements in the box. One is starting from the start and growing towards the end. One starting from the end and growing towards the start. When you use PackStart you add to the stack growing from the start and when you use PackEnd you add to the stack growing from the end.

--
You received this message because you are subscribed to the Google Groups "XWT Widget Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xwt-list+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Jeske

unread,
Jun 6, 2017, 11:27:30 AM6/6/17
to xwt-...@googlegroups.com
On Mon, Jun 5, 2017 at 11:54 PM, Vladimir Dimitrov <vlad.d...@gmail.com> wrote:
Imagine there are two stacks of child elements in the box. One is starting from the start and growing towards the end. One starting from the end and growing towards the start. When you use PackStart you add to the stack growing from the start and when you use PackEnd you add to the stack growing from the end.

I see. That's a little weird, but I can work with that. I've added that description to the wiki.

Can someone with collaborator/admin access on github go to the wiki and click "Add a custom sidebar? on the side, so I can make an organized sidebar?
Reply all
Reply to author
Forward
0 new messages