Re: win32lib: List's

new topic     » goto parent     » topic index » view thread      » older message » newer message

Derek, Robert,

I don't understand this-- I *don't* get the problem Robert described when I
put :

    for n = 1 to 10 do
      dummy = insertItem(List1, sprint(n),n)
   end for

into "ex06.exw" AFTER all the addItems in "LoadWin()".

What I do get is a list of numbers (digits) 1-10, followed by a list of
numbers (text) one thru ten, just as would be expected.

And even when I initially inserted every number in at position 1,
      dummy = insertItem(List1, sprint(n),1)
I still got them all inserted at the *top* of the list, each after the
previous, into position 1, resulting in a list of 10-1 at the top, and "one"
thru "ten" at the bottom of the list.


Maybe there's some platform problem?  I'm running under Win98 1st ed.

Dan Moyer

----- Original Message -----
From: "Derek Parnell" <ddparnell at bigpond.com>
To: "EUforum" <EUforum at topica.com>
Sent: Friday, November 01, 2002 11:36 PM
Subject: Re: win32lib: List's


>
> Robert,
> I agree that insertItem(lst,text,1) does not insert at the top of the
list.
> I don't know why 'cos that's what the API says it should do.
>
> However, insertItem(lst,text,0) does work. Also, the addItem() function
> works too.
>
> My example code...
>
> include win32lib.ew
> without warning
> integer win, lst1
> win =  create(Window, "Simple List",    0,   0,  0, 400, 400, 0)
> lst1 = create(List, "", win, 5,5, 350, 340, 0)
> constant LISTTOP = 0
> VOID = insertItem(lst1, "One", LISTTOP)
> VOID = insertItem(lst1, "Two", LISTTOP)
> VOID = insertItem(lst1, "Three", LISTTOP)
> VOID = insertItem(lst1, "Four", LISTTOP)
> WinMain(win, Normal)
>
>
> ----------------
> cheers,
> Derek Parnell
> ----- Original Message -----
> From: "Robert Szalay" <robsz1 at netzero.net>
> To: "EUforum" <EUforum at topica.com>
> Sent: Saturday, November 02, 2002 1:42 PM
> Subject: win32lib: List's
>
>
> > hello list.
> >
> > I am using win32lib v 0.57.9 and have a List.
> >
> > I have a loop that uses insertItem().
> >
> > i am using: insertItem(id,text,1) but..
> > everything that gets added ends up at then end of the list instead of
the
> > top.
> > So what do I use to add it at the top ?
> >
> > Thanks
> >     Robert Szalay
> >
> >
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu