Samantha <[EMAIL PROTECTED]> writes:

> 1. Is there a pygtk project that is written completely in pygtk (no
> glade) that has two windows/frame (I am not sure what the right word is)
> in a single window. Where one side is scrollable containing, say a tree
> widget and the other side responds to signals from the tree widget side.
> I would like the code to be a bit small, as I plan to read the entire
> thing (mostly for laziness. But I don't want to read the code to a
> browser, for example)

Sometimes this is called the "Container-and-contents" idiom.
See http://java.sun.com/products/jlf/at/book/Idioms7.html.

I think you want an HPaned widget with a scrolled window holding a
treeview (container) on the left and the contents display to be
updated on the right.

> 2. If #1 is not available, here is what I am trying to do. I have a main
> window with a tree on the left  side of a window. The tree is in a
> table. When the user clicks on a tree widget(?), something happens on
> the right side. I have been able to send a window as an argument to the
> function that does things on the right side of the window, but the
> widgets embedded in the window (being sent as an argument) doesn't
> appear to get inherited. I learned that I cannot have more than one type
> of gtkWidget in a gtkWindow, so I am not sure how I can go about
> accomplishing what I am trying to do.

To put multiple widgets in a GTK+ window, you need to use a layout
container widget that allows multiple child widgets.  Examples of
these widgets are HBox, VBox, HPaned, VPaned, and Table.  It may be
that I don't understand exactly where you are stuck.

The example I have of this is not very short, so maybe someone has a
nicer example to share with you.  Otherwise if you can show more about
what you have tried that hasn't worked, we may be able to offer
suggestions.

-- 
Doug Quale
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to