RE: Win32Lib's setIndex against a tree view

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

Don't thank me yet....the way I used is this is to force a selection of 
a tree view item when an item from a list view is selected.  After you 
call setIndex and then use the mouse to select a tree view item the item 
used in setIndex remains highlighted.  Dang-it!

Derek Parnell wrote:
> Thanks Jonas.
> 
> Jonas  Temple wrote:
> > All,
> > 
> > The setIndex in V 57.9 of Win32lib does not work for tree views.  If 
> > anyone is interested, here's the code to insert into setIndex to allow 
> > the routine to work for tree views:
> > 
> > --BEG CJT01
> >     elsif window_type[id] = TreeView then
> >         cur_index = getTVIndex(id)
> >         if cur_index then
> >             TVITEM = struct_TVITEM(or_all({TVIF_HANDLE,TVIF_STATE}), 
> > getHandle({id,cur_index}),
> >                     0, TVIS_SELECTED,"", 0, 0, 0, 0)
> >             VOID = sendMessage( id, TVM_SETITEM, 0, TVITEM )
> >             release_mem(TVITEM)
> >         end if
> >         TVITEM = struct_TVITEM(or_all({TVIF_HANDLE,TVIF_STATE}), 
> > getHandle({id,index}),
> >                     TVIS_SELECTED, TVIS_SELECTED,"", 0, 0, 0, 0)
> >         VOID = sendMessage( id, TVM_SETITEM, 0, TVITEM)
> >         release_mem(TVITEM)
> >         return
> > --END CJT01
> > 
> >

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

Search



Quick Links

User menu

Not signed in.

Misc Menu