Gtk_Tree widget help with gnome-obj-c



I'm confused.  Can someone send me an example of a tree widget 
using obj-c and how to get the selection.  I seem to be missing 
something here and the docs are somewhat lacking in explainations.

Also when I add a tree to a scrolled window I get the following 
message but I don't see any references to 
gtk_scrolled_window_add_with_viewport anywhere.  The code that I'm 
using to do this is:  My adjustments don't seem to work either, I 
can't scroll the tree.  I'm just learning so be kind:-)

ERROR MESSAGE
Gtk-Message: gtk_scrolled_window_add(): cannot add non scrollable widget use gtk_scrolled_window_add_with_viewport() instead

CODE
hbox = [[Gtk_HBox new] show];	//main box
[hbox set_border_width:5];
	
horzAdj = [[Gtk_Adjustment new] initWithAdjustmentInfo:0.0
		limitLower:0.0
		limitUpper:10.0
		incrementStep:0.1
		incrementPage:1.0
		sizePage:1.0];

vertAdj = [[Gtk_Adjustment new] initWithAdjustmentInfo:0.0
		limitLower:0.0
		limitUpper:26.0
		incrementStep:1.0
		incrementPage:1.0
		sizePage:1.0];

treeBox = [[[Gtk_ScrolledWindow new] initWithAdjustments:horzAdj adjV:vertAdj] show];
[treeBox set_usize:100 height:350];
[hbox pack_start:treeBox doExpand:FALSE doFill:TRUE doPadding:5];
	
	itemTree = [[Gtk_Tree new] show];
	[treeBox add:itemTree];

Gtk-Message: gtk_scrolled_window_add(): cannot add non scrollable widget use gtk_scrolled_window_add_with_viewport() instead

-- 
George Farris - VE7FRG
George@gmsys.com




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