RE: Setting the background color of a GtkFixed




You can set GtkFixed to have GdkWindow also.

        GtkWidget *w=gtk_fixed_new();
        GTK_WIDGET_UNSET_FLAGS (w, GTK_NO_WINDOW);
Now I think you can set the background like other widget which has GDK
window.

Tom.

-----Original Message-----
From: gtk-app-devel-list-bounces gnome org [mailto:gtk-app-devel-list-
bounces gnome org] On Behalf Of Olexiy Avramchenko
Sent: Wednesday, November 10, 2004 6:10 AM
To: Tapan Satpathy Ansuman-A19108
Cc: gtk-app-devel-list gnome org
Subject: Re: Setting the background color of a GtkFixed

Tapan Satpathy Ansuman-A19108 wrote:

Hi,

Thanks. This worked well for me.

I have two more questions.

Is it possible to make the widget transparent ? I want to put my
Frame as
a child of the fixed of another Frame, and I want to make the child
transparent. Is there any way?


I think there's no easy way. Gdk window can have transparent
background
[1], but many widgets (like GtkFixed) dont have corresponding gdk
windows [2]. There's container with corresponding gdk window -
GtkLayout
[3], try it instead of GtkFixed.

[1]

http://developer.gnome.org/doc/API/2.0/gdk/gdk-Windows.html#gdk-window-
set-back-pixmap
[2]

http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#GTK-WIDGET-NO-
WINDOW-CAPS
[3] http://developer.gnome.org/doc/API/2.0/gtk/GtkLayout.html

Seocond,

In frame heirarchy [Considering my approach to frame, ie, Frame =
frame +
fixed], if I make a hirearchy of frames, the child frames are drifted
right. I am putting the child frame in (0, 0) of the parent frame's
Fixed.
I think this is happening because of the border of the frame, can I
avoid
this?

|--------|
||-------|
|||------|
|||______|

This for reference.


Any widget packed inside the frame will be shifted right by the
frame's
side border width. You can't avoid this. Maybe you just dont need
frames
in some cases ?

    Olexiy

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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