RE: Win32Lib's setIndex against a tree view

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

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     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu