Re: hiding columns on certain rows



Jason Burchfield escreveu:
I have a Gtk::TreeView with two columns. Is there any way to hide a column on certain rows? I use a Gtk::TreeStore and I use a CellRendererToggle in the first column. I only want the Toggle shown on the children rows. Is this possible?
Hi,

 Yes, it's possible. Two ways:
1 - Insert one blank child row to the row within the Toggle, them connect the "before expand" signal to a callback function where you verify if toggled. Them, if toggled, you delete this blank row and insert new rows. 2 - When inserting, you verify if toggled, if yes, you insert children rows, if no, not insert. Then you connect the "toggled" signal to a callback function where you check if toggled, if yes, you insert children rows, if no, delete children rows.

I prefer the second option, but the first option provides insert rows just only the user see children rows. You can also mix the options.

 Good Luck!


[]'s

Claudio

Um peregrino de problemas; Um pergaminho de soluções!





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