Re: question on using GtkCellRendererProgress

On Mon, Feb 18, 2008 at 09:29:26PM +0800, Gregory Hosler wrote:
Hash: SHA1

Hi all,

I've got a gtk_list_store, and one of the columns I want to make a progress meter.

I'm gathering that I use teh cell rendered GtkCellRendererProgress for this column. But I
have 2 points of confusion.

1) When I create the table (gtk_list_store_new()), what is the G_TYPE I use for this
particular column defn ?

2) How do I refer to this column in a gtk_list_store_set() (i.e. yes, I know I refer to
the column number, but what do I pass in for a value ?)

Progress bars have two properties: value and text.  value should be of
G_TYPE_INT, while text is STRING and can print text onto the progress

You can then set the values with:
gtk_list_store_set (..., COLUMN_PERCENT, new_value, COLUMN_TEXT, new_text);

Many thanks, and kind regards,

- -Greg Hosler


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