Re: A question on some features
- From: Havoc Pennington <hp redhat com>
 
- To: dani brody <brodydani hotmail com>
 
- Cc: gtk-list gnome org
 
- Subject: Re: A question on some features
 
- Date: Mon, 17 Feb 2003 01:20:06 -0500
 
On Sun, Feb 16, 2003 at 06:06:28PM -0500, dani brody wrote: 
> Fake Notebooks: The problem with the current way that notebooks work, is 
> that each page is a child, but this could cause a problem if a person wants 
> to add a page without children. For example, creating the page widget later, 
> when the tab is selected. Or for not really changing children, for example 
> having a view that is the same widget but changes information as each tab is 
> selected.
There are some interesting problems here such as how do you determine
the size of the notebook if you can't size_request all its children.
> Child Swapping: To allow a container to swap a child widget with another 
> widget. So if for example i have widget1 as a child for table1, and i want 
> to replace wherever widget1 is with widget2. Now normally you would have to 
> save how widget1 was added, remove widget1, and then add widget2 the same 
> way you added widget1. But with child swapping the widget2 will just be 
> added inplace of widget1, with somthing like this:
> 
> gtk_container_swap_child(table1, widget1, widget2)
This is pretty easy to do now, just put widget1 and widget2 in a vbox
or hbox and gtk_widget_hide() the one you aren't using and
gtk_widget_show() the other one.
Another way to do this is to put them in a notebook and turn off the
notebook tabs. (The advantage of the notebook way is that the
notebook's size will match the max size of both widgets.)
Havoc
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]