Re: Display control with Gtk2 and Glade2

--- Kenneth Swanson <kswanson watson wustl edu> wrote:

How varied are the right side widgets going to be?  I mean, is it going
to be dynamically generated off the data selected on the left side, so
that you might get a 10 column 2 row table in one case, a 6 column 8 row
table on another, etc.?  That is, is the structure and number of widgets
likely to depend on the individual selection?

If so, I don't know that Glade-2 is going to help you out very much.

On the other hand, if the choices are going to be pretty static--e.g.
you will only have a choice between 3 sets of layouts, which are always
the same every time--you might be able to work it out.  Off the top of
my head, you might be able to put in, say, 3 vboxes with each of the 3
layouts you want into a vbox or hbox on the right side, and then just
hide the ones you don't want to see on specific selections.

Although I think the better solution would be to make specific handler
classes for each layout, and then put in instances of that class for
each particular selection.  But I don't know if you could use glade-2
for that, since I think all glade projects have to have their own window

Just my thoughts.


On Fri, 2006-09-01 at 14:57 +0530, rashwin wrote:
Hi All,

I have a query regarding Glade2 and Gtk2, regarding the control of display
and is as below:

The main window of my application is divided into two Vboxes.
The left Vbox contains a TreeView and the display on the right Vbox is controlled
through the selection of the TreeView.
For eg: for one particular treeitem selection[on the left side], the right Vbox
can contain a Table widget with 10 columns and 2 rows.
For another treeitem selection[on the left side], the right side can contain
just a label and text widgets.

I have got the basic infrastructure up through Glade-2 and perl-Gtk2[like adding the
TreeView on the leftside]. However, I am not sure, as to how to change the display
on the right side based on the tree selection. It will be better if I could create
the different right display widgets also through Glade-2. More information on the window
layout is given towards the end of this mail.

I have done the above without using Glade2, by destroying and creating different
widgets on the right display, whenever the tree item selection/deselection signal is caught.

It would be helpful, if someone can throw light on how to control
the dynamic display on the right side using Glade2 and Gtk2.

Any help in this regard will be highly appreciated.

I am not sure, whether this is the right list to ask this query.
Apologize for any inconvenience caused.


Window Layout

The main window of my application is as below:

| File Edit View Help
|                |                        |
|+ Imports       |                        |
|  - file1       |  Name:    ---------    |
|  - file2       |                        |
|                |  Help:    ---------    |
|+ Information   |                        |
|                |  Display:  --------    |
|  -Info1        |                        |
|  -Info2        |                        |
|                |                        |

The left display of the main window, is a tree view and the right side
is a Table widget with a collection of widgets[label and Text widgets].
Based on the selection in the tree view, the right display changes for eg:
If file1 is selected, only Name and Help Column widgets need to be displayed.

If Info1 is selected, then a different widget class needs to be displayed on the right side

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of
the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and
delete the original message. Further, you are not to copy, disclose, or distribute this e-mail
or its contents to any other person and any such actions are unlawful. This e-mail may contain
viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable
for any damage you may sustain as a result of any virus in this e-mail. You should carry out
your own virus checks before opening the e-mail or attachment. Infosys reserves the right to
monitor and review the content of all messages sent to or from this e-mail address. Messages
sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
gtk-perl-list mailing list
gtk-perl-list gnome org

Kenneth Swanson <kswanson watson wustl edu>

gtk-perl-list mailing list
gtk-perl-list gnome org

The application looks so simple that it can be written directly in Perl.

Glade can be used to check how it looks and to get an idea about widget

Actually, that's how I've used glade-w in the application I'm developing,
i.e. I used for quick visual prototyping, and then enhanced and coded the
application from scratch.

Glade is not good for repetitive items - it doesn't know how to generate
a loop - that was one of my concerns.

So I wouldn't have very high expectations wrt glade.

FWIW, I suggest to also have a look at .


Applications From Scratch:

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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