Display control with Gtk2 and Glade2




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.


Thanks
Ashwin


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***



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