Re: set widget size
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: chabayo <chabayo yahoo de>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: set widget size
- Date: Sat, 6 May 2006 20:46:51 +0200
On Sat, May 06, 2006 at 07:53:10PM +0200, chabayo wrote:
i have a TreeView in a ScrolledWindow thgoughout a function, in it's
arguments is the pointer to the container_Widget.
For now i always call it, just for testing, in a toplevel_Window.
So the toplevel_Window is the container, which will be set like...
--
GtkWidget *table_view ( GtkContainer *container ,
mysql_setup_data *db_setup , char *table ) {
.
.
.
GtkWidget *viewport = gtk_scrolled_window_new ( NULL , NULL );
data.tree = gtk_tree_view_new ( );
.
.
.
gtk_widget_get_size_request ( GTK_WIDGET ( data.tree ) , &data.i ,
&data.j );
gtk_widget_set_size_request ( GTK_WIDGET ( container ) , data.i ,
data.j );
gtk_container_add ( GTK_CONTAINER ( viewport ) , data.tree );
.
.
.}
--
...whats my problem?
I cannot quite understand what you are trying to achieve,
nevertheless:
gtk_widget_get_size_request() returns the size explicitly
set with gtk_widget_set_size_request(). As no size was
explicitly set on the tree view, you get -1 in data.i and
data.j. To request size from a widget, use gtk_widget_size_request().
Yeti
--
Anonyms eat their boogers.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]