Re: Listviews and time....
- Posted by Euman <euman at bellsouth.net> Apr 03, 2001
- 449 views
Well now, this sounds great...... OfCourse those of us who insist on fast will re-write code/ I haven't had a win32lib that I didnt have to re-code for... Euman ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Subject: RE: Listviews and time.... > > > Euman wrote: > > global function addLVItem(integer id,atom iIcon,sequence text) > > > > Bahh, RECURSIVE AS HELL > > > > What's wrong with it? Everything if you have alot of info to > > feed your LV! > > > > I was hopeing someone might have an idea how to load in a > > couple thousand > > items to a Listview in a timely manner.... > > Done. > > This has been coded for the new version. > > result = Dispatch( integer id, "addItems", sequence items) > > where 'id' is the ID for a Listview, Treeview, List, Combo, or imagelist > 'items' is a list of items. > For text only items, each element is a text sequence, > image only items, each element is either a hWnd to a bitmap, or a > filename. > text + image items (like listviews) , each element is a 2-element > sequence > of atom(Icon) and sequence(Text) > > eg. > sequence result > result = Dispatch(myListView, "addItems", > { {wipIcon, {"lib101","Bug","setTextColor() for edit > controls."}}, > {doneIcon, {"lv027","Enhanc", "New addItems()"}}, > {doneIcon, {"tv012","Enhanc", "New addItems()"}}, > }) > if result[1] = -1 then > -- Function not supported > ... do it the long way ... > end if > > This also demonstrates the new Dispatch() function, which allows for > optional functionality to be implemented. This means that a mild form of OO > polymorphism is available. It also enables "light" versions of win32lib to > be created. > > This is all optional as all the current functions still exist and no-one has > to go a rewrite their win32lib code> > Oh, except if your are creating your own imagelists. The current > implementation only allowed for 32x32 or 16x16 pixel images. To cater for <snip> > >