Re: GtkContainer multi - layer



Hi again

On 04/14/2011 03:21 PM, Michael Trimarchi wrote:
Hi all,

I would like to have a multi layer container widget. The problem is that GtkWindow is a GtkBin so only one 
widget on top of
it. The HBox and Vbox can have several widget on it but not packed on different layer. If the container can 
add widget on
different layer, so probably it will be easy to create trasparency effect.

gtk_container_layer_add(GTK_MULTI_CONTAINER(container), widget, level);

You can have in this way trasparent scrollbar (for example) on a viewport.

Another problem:

Suppose that you want to create the second layer only with two scrollbar. The only way that I have found is:

One GtkTable 2x2, a visible eventbox on 1,1 and the two scrollbar on 2,1 and 1,2. The eventbox must be 
visible
in order to having the scrollbar at their correct size

Michael Trimarchi

I have crated a gtkstacked widget so I can have different layer on it. 

/* Creates a new button with the label "Hello World". */
    button[0] = gtk_button_new ();
    button[1] = gtk_button_new_with_label ("Goodby World");

    gtk_button_set_image(GTK_BUTTON(button[0]),
                         gtk_image_new_from_file("close.png"));

    gtk_stacked_put(GTK_STACKED(stacked), button[0]);
    gtk_stacked_put(GTK_STACKED(stacked), button[1]);

This is an example in how use it. Now the problem is how do trasparency on it and on each level.

Do you have any idea?

Michael Trimarchi



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