Re: inserting ColorButton in CellRenderer ....



В Птн, 14/03/2008 в 10:43 -0400, Roberto Alejandro Espí Muñoz пишет:
> Ok I saw it .. What I don't understand is why do you have to paint the
> widget from scratch?? and check if it is active, or toggled to paint
> that particular behaviour?? isn't there a simpler way to just add it
> to the cell and call the widget's own paint function?? The widget I
> want is a little more complex it has an inner rectangle showing the
> current color. 

Because it is not QT :).

TreeView was designed to hold and show lot of data from TreeModel. If
each cell was represented as widget it could increase CPU usage
dramatically and slow down the View.

So, you must to draw the widget "from scratch" using cell area. There is
no other way.

The states and flags I am checking is used to draw my cell properly -
selected, checked/toggled, etc.

See GTK sources.

-andrew




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