Re: scrolled...



>I created a program in which the user can draw. I used the code below, but aft
>er I  decided to put a scrolled window, I can?t draw. This bar is really import
>ant because the draws are big.
>Can anybody help me ?
>How can I use a scrolled bar with canvas ?
>
> Papp = gnome_app_new ( "ka", "toolbar radio buttons" );
> .
> .
> .
> canvas = gnome_canvas_new();   /* cria uma janela canvas */
> scrolled = gtk_scrolled_window_new(NULL,NULL);
> gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),GTK_POLICY_ALWAY
>S, GTK_POLICY_ALWAYS);
> .
> .
> .
> gnome_app_set_contents (GNOME_APP(Papp),scrolled);
> gnome_app_set_contents (GNOME_APP(Papp), canvas); 

i know nothing about gnome, but i think you want:

  gtk_container_add (GTK_CONTAINER(scrolled), canvas);
  gnome_app_set_contents (GNOME_APP(Papp),scrolled);

--p



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