Re: How to make a gtktreeview column flexible?

2008-04-28 Thread Gabriele Greco

 How do i make the column always use a much space as possible but never
 more than available?



You have to call the following function:

gtk_tree_view_column_set_expand(your_column, TRUE);

Maybe you'll have also to call:

gtk_tree_view_column_set_fixed_width (column, width);

or

gtk_tree_view_column_set_expand(column, FALSE);

... for the other columns.

-- 
Ing. Gabriele Greco, DARTS Engineering
Tel: +39-0105761240  Fax: +39-0105760224
s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY)
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Solved: How to make a gtktreeview column flexible?

2008-04-26 Thread Till Harbaum / Lists
Hi,

in have solved this problem. Here's the answer for reference:

Instead of using gtk_tree_view_insert_column_with_attributes to insert
a column, one might use seperate calls to  
gtk_tree_view_column_new_with_attributes
and gtk_tree_view_insert_column as this give us an explicit reference to
the column. Thus one can use gtk_tree_view_column_set_expand(TRUE)
on that column and voila ... the column scales nicely with the window width.

Till

Am Freitag 25 April 2008 schrieb Till Harbaum / Lists:
 Hi,
 
 i have a gtktreeview filling the complete width of a window. Now i want the 
 view to always use the full width. I therefore want the middle column (a text
 column) to be flexible. I want it to be as wide as possible for any given 
 window
 width. So if you make the window wider i want this column to become wider.
 
 If i just enable ellipsis in the columns text renderer the column gets very 
 small and only a fraction of the window width is used. If i make it a fixed 
 width it's exactly that: fixed width.
 
 How do i make the column always use a much space as possible but never
 more than available?
 
 Till
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Solved: How to make a gtktreeview column flexible?

2008-04-26 Thread Thomas Dybdahl Ahle
Interesting, and that make the text eclipse correctly as well?

On Sat, 2008-04-26 at 11:16 +0100, Till Harbaum / Lists wrote:
 Hi,
 
 in have solved this problem. Here's the answer for reference:
 
 Instead of using gtk_tree_view_insert_column_with_attributes to insert
 a column, one might use seperate calls to  
 gtk_tree_view_column_new_with_attributes
 and gtk_tree_view_insert_column as this give us an explicit reference to
 the column. Thus one can use gtk_tree_view_column_set_expand(TRUE)
 on that column and voila ... the column scales nicely with the window width.
 
 Till
 
 Am Freitag 25 April 2008 schrieb Till Harbaum / Lists:
  Hi,
  
  i have a gtktreeview filling the complete width of a window. Now i want the 
  view to always use the full width. I therefore want the middle column (a 
  text
  column) to be flexible. I want it to be as wide as possible for any given 
  window
  width. So if you make the window wider i want this column to become wider.
  
  If i just enable ellipsis in the columns text renderer the column gets very 
  small and only a fraction of the window width is used. If i make it a fixed 
  width it's exactly that: fixed width.
  
  How do i make the column always use a much space as possible but never
  more than available?
  
  Till
  ___
  gtk-app-devel-list mailing list
  gtk-app-devel-list@gnome.org
  http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
  
 
 
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
-- 
Best Regards,
Med Venlig Hilsen,
Thomas

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Solved: How to make a gtktreeview column flexible?

2008-04-26 Thread Thomas Dybdahl Ahle

On Sat, 2008-04-26 at 12:16 +0100, Till Harbaum / Lists wrote:
 Am Samstag 26 April 2008 schrieb Thomas Dybdahl Ahle:
  Interesting, and that make the text eclipse correctly as well?
 You have to enable ellipsize seperately of course, but then yes, once 
 the window is not wide enough the text in the flexible column is being
 ellipsized nicely.

And the trick was setting expand(True). Interesting. In my code I use a
listener on the size-request signal, to change the fixed width of the
column.

 Till
 
  
  On Sat, 2008-04-26 at 11:16 +0100, Till Harbaum / Lists wrote:
   Hi,
   
   in have solved this problem. Here's the answer for reference:
   
   Instead of using gtk_tree_view_insert_column_with_attributes to insert
   a column, one might use seperate calls to  
   gtk_tree_view_column_new_with_attributes
   and gtk_tree_view_insert_column as this give us an explicit reference to
   the column. Thus one can use gtk_tree_view_column_set_expand(TRUE)
   on that column and voila ... the column scales nicely with the window 
   width.
   
   Till
   
   Am Freitag 25 April 2008 schrieb Till Harbaum / Lists:
Hi,

i have a gtktreeview filling the complete width of a window. Now i want 
the 
view to always use the full width. I therefore want the middle column 
(a text
column) to be flexible. I want it to be as wide as possible for any 
given window
width. So if you make the window wider i want this column to become 
wider.

If i just enable ellipsis in the columns text renderer the column gets 
very 
small and only a fraction of the window width is used. If i make it a 
fixed 
width it's exactly that: fixed width.

How do i make the column always use a much space as possible but never
more than available?

Till
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

   
   
   ___
   gtk-app-devel-list mailing list
   gtk-app-devel-list@gnome.org
   http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 
 
-- 
Best Regards,
Med Venlig Hilsen,
Thomas

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


How to make a gtktreeview column flexible?

2008-04-25 Thread Till Harbaum / Lists
Hi,

i have a gtktreeview filling the complete width of a window. Now i want the 
view to always use the full width. I therefore want the middle column (a text
column) to be flexible. I want it to be as wide as possible for any given window
width. So if you make the window wider i want this column to become wider.

If i just enable ellipsis in the columns text renderer the column gets very 
small and only a fraction of the window width is used. If i make it a fixed 
width it's exactly that: fixed width.

How do i make the column always use a much space as possible but never
more than available?

Till
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list