RE: separator and disable item in GtkTreeView

On Mon, 2003-12-29 at 14:20 +0800, Liu Neo-W4135C wrote:
> I hava a brief browse of the GtkFileChooserDefault in 2.3.1( so correct me if I'm wrong ). 
> I think the 1) the seperator is still in the specified column, not extend to the whole item. So I still can't do like below
> Recently used---this is an seperator and left alignment in the whole item, not the column
> Icon 1, pixbuf1, text1
> Inco 2, pixbuf2, text2
> Seldom usde--this is an seperator
> Icon3, pixubf3, text3
> 2)the way to make seperator not selected give me a hint to implement the enable/disable item. However, I don't whether there is a way to make the UI different, such as enabled item in normal state, disabled item in disable state such as grey foreground.
> Thanks and best regards,

The quick & dirty way to handle insensitive items currently is to have
the custom cell renderer (or cell-data func) check whatever needs to be
checked (a boolean "sensitive" column in the model, for example), and
then set the "forground" & "background" properties of the text render to
the insensitive/normal colors.

The "right" way is to subclass the renderers to implement a "sensitive"
property, which overrides the drawing methods when the "sensitive"
property is unset and draws the renderer properly.

The "best" way is to add the "sensitive" property to the current renders
in GTK+.


    Jim Cape

    "It is literally true that, like Christianity, Socialism
     has conquered the world by defeating itself."
        -- Alexander Berkman, ABC of Anarchism

Attachment: signature.asc
Description: This is a digitally signed message part

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