Re: Design Issues - Getting started with GUI interfaces.




On Nov 3, 2004, at 4:48 PM, Tyler Hepworth wrote:

On Wed, 3 Nov 2004 16:11:04 -0500 (EST), muppet <scott asofyet org> wrote:

basically, you're wanting to replace the contents of some container with an
editor widget for the currently selected row of the tree.
[snip]

Second, I am not creating an editor.  Perhaps I did not explain myself
well enough.  Let me see if I can lay out the goal of what I am trying
to do:
[snip description of a tree on the left and a pane on the right (a listview, if i read correctly) allowing the user to see brief details of the currently-selected thing on the left]

so it's a typical explorer-like browse-and-details interface. if you're using a TreeView (lists and trees use the same view widget) for the list, and all of the things you can select on the left have the same properties, you can actually avoid recreating the details widget every time, and just recreate the ListStore. i do that in object_browser -- http://asofyet.org/muppet/software/gtk2-perl/object_browser-0.006 (creates several TreeViews in a tabbed notebook, and fills each one's model with data related to whatever is selected in the tree on the left.)

i said "editor" because it's a very short leap from displaying the details to allowing you to modify the details in the same widget, especially if you're using a TreeView. in the past when i've set up things like this, i've tried to avoid the need to create another window in which to do the editing, as it's a lot of clutter for the user. if you don't want to do that, it's not a problem, you'd use the same infrastructure either way. ;-)


my earlier suggestion still stands; just keep in the toplevel window a reference to the container you need to fill.

--
"the ternary operator makes it a bit less ugly."
    -- kaffee




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