Re: Gtk::TreeView: Custom cellrenderer for single cells



Thanks for your answers. I've been pretty busy implementing my own dropdown/combo
box style renderer until now.

I think -- unless I didn't understand a certain part -- that having multiple
renderers is just fine unless I want to fill the list of my drop down renderer
with different items for different cells.

...or am I confusing something? The CellRenderer is used on a column basis,
right? So I'd have to put as many of my renderers inside a single column as
I want different drop down lists and fiddle around with the property_visible,
right?

Sorry, I'm kind of confused about all this. But maybe I'll come up with some
docs afterwards ;-)

Best reagards,

DJ

>> Well, there are several posibilities for doing this.
>> For example, you can insert into a cell several cellrenderers and make
>> them being enabled and visible
>
>That's a clever idea.
>
>> depending on boolean values in other hidden
>> (service) columns.
>
>But it would probably be nicer to use a set_cell_data_func() callback to
>do this:
>http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1TreeViewColumn.html#a19

>
>> Or you can catch an on_button_pressed event for a treeview and change
>> cellerenderer settings in accordance with a level of a branch in that tree

>
>That sounds horrible.
>
>> -
>> I fill the dropdown list of a Combo_Cellrenderer with diferent names or
>> change the range and step settings of a SpinButton_Cellrenderer. That
>> works
>> for every cell individually.
>>     Igor Gorbounov
>
>Murray Cumming
>murrayc murrayc com
>www.murrayc.com
>www.openismus.com
>




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