Re: scrolled window not appearing



manu aradhya wrote:

hi all, iam not able to just display a scrolled.
 scrolled1 = gtk_scrolled_window_new (NULL, NULL);
 gtk_widget_show (scrolled1);
 gtk_widget_set_usize (scrolled1, 300, 200);
gtk_fixed_put (GTK_FIXED (fixed_2),scrolled1 , 40,
94);

 it is not giving any error,if i attach a clist to
scrolled, only clist appear.but no scrolled window.
atleast above code has to display a scrolled window
isnt it ?

Steps typically performed by Glade to put content into a scrolled
window:
1. gtk_scrolled_window_new ()
2. gtk_widget_show (scrolled_window)
3. Put the scrolled window into some parent container
4. gtk_scrolled_window_set_policy () (optional)
5. gtk_scrolled_window_set_shadow_type () (optional)
6. Create child instance, i.e. gtk_tree_view_new ()
7. gtk_widget_show (child_instance)
8. gtk_container_add (scrolled_window, child_instance)

Notes:
1. GtkCList is deprecated.
2. gtk_widget_set_usize () is deprecated.
3. For the sake of flexibility you should avoid GtkFixed and fixed size 
   widgets
4. Only few widget types can be put directly into a scrolled window
   (have native scrolling support). See description at
   http://developer.gnome.org/doc/API/2.0/gtk/GtkScrolledWindow.html



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