Re: Regarding Multiple Windows



Preethi Vasanth wrote:
> Hi all,
> I was just wondering if I could create multiple windows in a main window.
> I was suggested to use frames as windows and assign a create_window ()
> to the frame click event.But the argument is tht it is equivalent to 
> clicking a button.I want to create a child window in which some action 
> is running.Can anyone help me in this?
> Thanx in advance,
> Preethi.
>

Hi Preethi,

gtk doesn't really support MDI interfaces, for a number of reasons. They 
are thought to be ugly, confusing, and almost impossible to implement in 
a way that would make them consistent with the rest of the user's 
desktop. Windows has MDI (arguably) because of limitations in the way 
you can handle windows, rather than because it's a good idea.

The usual recommendation is to have multiple top-level windows (like mac 
applications) and to rely on the user's window manager to keep them 
organised. An alternative is to use a gtk_notebook for your top-level 
window, and let the user switch between areas by clicking on the tabs. 
For example, Excel does this for moving between pages in a worksheet.

I believe there's a gnome MDI widget, but I've never used it.

You can sort-of fake draggable windows in a main window, but it's a 
fearful amount of code:

http://www.vips.ecs.soton.ac.uk/vips-7.7/snap.jpg

John



========================================================== 

Madame de Pompadour 
Images of a Mistress 

16 October 2002 - 12 January 2003 

For information and tickets: 
http://www.nationalgallery.org.uk/exhibitions/pompadour/default.htm



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