1. TreeView problem
i'm using Win32lib 0.57.9, and i'm writing this program to browse
lyrics, play songs, put together the ones you listen to the most, etc,
and all the songs are organized by author in a TreeView, but it never
draws completely when the program starts. Only the very first item shows
up. i have to cover the TreeView up with another program or something
and switch back to it for it to redraw, but after that it's fine. what's
going on?
2. Re: TreeView problem
sounds like a repaint prolem. try using repaintWindow( TreeViewID ) when the
program loads.
also, if you use setRect() to resize the treeview, make sure the last parameter
is True (1) so
the TreeView will repaint itself when its resized.
~Greg
----- Original Message -----
From: sephiroth _ <euman2376 at yahoo.com>
Subject: TreeView problem
i'm using Win32lib 0.57.9, and i'm writing this program to browse
lyrics, play songs, put together the ones you listen to the most, etc,
and all the songs are organized by author in a TreeView, but it never
draws completely when the program starts. Only the very first item shows
up. i have to cover the TreeView up with another program or something
and switch back to it for it to redraw, but after that it's fine. what's
going on?
TOPICA - Start your own email discussion group. FREE!
3. TreeView problem
This is a multi-part message in MIME format.
--Boundary_(ID_JlGF6QVFSX5RjoTD4ohZag)
Hi:
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?
Simple demo attached.
Regards,
Irv
--Boundary_(ID_JlGF6QVFSX5RjoTD4ohZag)
Content-type: application/octet-stream; name=tv-test.exw
Content-transfer-encoding: quoted-printable
Content-disposition: attachment; filename=tv-test.exw
-- code generated by Win32Lib IDE v0.10.2
include Win32Lib.ew
without warning
setWindowBackColor( Window1,12632256)
global constant TreeView2 =3D create( TreeView, "TreeView2", Window1, =
28, 32, 150, 200, =
or_all({TVS_HASLINES,TVS_LINESATROOT,TVS_HASBUTTONS,TVS_SHOWSELALWAYS}) =
)
global constant LText3 =3D create( LText, "LText3", Window1, 204, 36, =
150, 20, 0 )
tree &=3D addTVItem(TreeView2,0,0,"Two",0) =20
end procedure
onOpen[Window1] =3D routine_id("Window1_onOpen")
setText( LText3,getItem(TreeView2,index)) =20
end procedure
onChange[TreeView2] =3D routine_id("TreeView2_onChange")
WinMain( Window1, Normal )
--Boundary_(ID_JlGF6QVFSX5RjoTD4ohZag)--
4. Re: TreeView problem
From: Matthew Lewis <matthewwalkerlewis at YAHOO.COM>
> Looks like your demo got mangled. However, getItem doesn't work for
> TreeView's, although it probably should.
>
> 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
>
Many Thanks! That works fine.
Regards,
Irv
5. Re: TreeView problem
- Posted by jjnick at cvn.com
Apr 16, 2001
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
>