Re: TreeView problem
- Posted by jjnick at cvn.com Apr 16, 2001
- 482 views
Wow, I hadn't made it to that part of my code and yet somebody has already stumbled on a problem that I would have faced down the road . . . Cool!!! ----- Original Message ----- From: "Matthew Lewis" <matthewwalkerlewis at YAHOO.COM> To: "EUforum" <EUforum at topica.com> Subject: RE: TreeView problem > > -----Original Message----- > > From: Irv Mullins [mailto:irvm at ellijay.com] > > > When I try to retrieve the text from a treeview, I get a > > Win32Lib error: > > Error code 428 > > getitem requested and class not LISTBOX or COMBO > > > > I'm using the latest stamped version of Winlib from RDS. > > Is there a fix for this that I missed? > > Looks like your demo got mangled. However, getItem doesn't work for > TreeView's, although it probably should. The correct routine to use would > be getTVText: > > global function getTVText( integer iItem ) > if iItem then > return peek_string( tvitem_data[iItem][3] ) > else > return "" > end if > > end function > > To make getItem work with TreeViews, you'll need to change getItem: > > and not find(window_type[ id ], {ComboBoxEx, ListView} ) > > to > > and not find(window_type[ id ], {ComboBoxEx, ListView, TreeView} ) > > and then add an elsif clause beneath the processing for ListView's: > > elsif window_type[id] = TreeView then > if item then > return peek_string( tvitem_data[item][3] ) > else > return "" > end if > > > Matt Lewis >