1. Strange ListView Behavior
- Posted by don cole <doncole at pac?ell.n?t> May 23, 2008
- 655 views
- Last edited May 24, 2008
When I setLVItemText(ListView89,2,2,"***") into an empty ListView. Nothing happens. However if I for x=1 to getLVCount(ListView89) do junk&=addLVItem(ListView89,0,"") end for First then it works ok. Don Cole
2. Re: Strange ListView Behavior
- Posted by Derek Parnell <ddparnell at big?o?d.com> May 24, 2008
- 639 views
don cole wrote: > > When I > > setLVItemText(ListView89,2,2,"***") > > into an empty ListView. Nothing happens. Let me get this straight ... you are trying to change the text of a non-existant item and you're surprised that it doesn't do anything. > However if I > > for x=1 to getLVCount(ListView89) do > junk&=addLVItem(ListView89,0,"") > end for > > First > > then it works ok. Then you add some stuff and now changing items works ... Yep, that is weird. -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell
3. Re: Strange ListView Behavior
- Posted by CChris <christian.cuvier at agricu?tur?.gouv.fr> May 24, 2008
- 643 views
don cole wrote: > > When I > > setLVItemText(ListView89,2,2,"***") > > into an empty ListView. Nothing happens. > > However if I > > for x=1 to getLVCount(ListView89) do > junk&=addLVItem(ListView89,0,"") > end for > > First > > then it works ok. > > Don Cole I'd expect that. setLVItem() sets an item's properties. The item must exist prior. If you add it first, then it exists and can be set. I jnow, some routine sets, like defineUserProperties() and friends, weren't designed like this. But I think this behaviour should remain the exception. add() adds and sets somehow, set() only sets. The release of win32lib 0.70.4a will be delayed a little due to the current development activity for Eu v4.0. I'm now targetting June 15 or something around that date. CChris
4. Re: Strange ListView Behavior
- Posted by don cole <doncole at pac?ell?net> May 24, 2008
- 679 views
Derek Parnell wrote: > > don cole wrote: > > > > When I > > > > setLVItemText(ListView89,2,2,"***") > > > > into an empty ListView. Nothing happens. > > > Let me get this straight ... you are trying to change the text of a > non-existant > item and you're surprised that it doesn't do anything. > > > > However if I > > > > for x=1 to getLVCount(ListView89) do > > junk&=addLVItem(ListView89,0,"") > > end for > > > > First > > > > then it works ok. > > Then you add some stuff and now changing items works ... > > Yep, that is weird. > > > -- > Derek Parnell > Melbourne, Australia > Skype name: derek.j.parnell Of course I start out with, global constant ListView89 = createEx( ListView, {"ListView89"," "," "," "," "," "," "," "}, Window1, 4, 4, 776, 148, w32or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0 ) Don Cole
5. Re: Strange ListView Behavior
- Posted by don cole <doncole at pacbel?.?et> May 24, 2008
- 640 views
CChris wrote: > > don cole wrote: > > > > When I > > > > setLVItemText(ListView89,2,2,"***") > > > > into an empty ListView. Nothing happens. > > > > However if I > > > > for x=1 to getLVCount(ListView89) do > > junk&=addLVItem(ListView89,0,"") > > end for > > > > First > > > > then it works ok. > > > > Don Cole > > I'd expect that. > setLVItem() sets an item's properties. The item must exist prior. > If you add it first, then it exists and can be set. > I jnow, some routine sets, like defineUserProperties() and friends, weren't > designed like this. But I think this behaviour should remain the exception. > add() adds and sets somehow, set() only sets. > > The release of win32lib 0.70.4a will be delayed a little due to the current > development activity for Eu v4.0. I'm now targetting June 15 or something > around > that date. > > CChris Thanks CChris, I'll just keep doing it the same way. Not really a problem but weird. Don Cole