Re: Win32lib v0.52 released

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

Derek Parnell wrote:

> > David Cuny wrote:
> >
> >2. The ListTreeView demo works with the tree, but the list portion
> >no longer
> >works.
>
> True. But I don't know why. It is not receiving the
> notification messages
> that I'd expect. Maybe Matt L. can help us on this one. At
> this stage I'll
> just note it as a known bug.
>

Ooh!  Ooh!  I know!

Treeviews now respond to onChange when the user clicks on an item.  Somehow
I'd overlooked this when I originally coded that nasty onEvent method.  If
you change onEvent_TV() in the demo to the code below, it will work fine (or
at least work as it was designed to :).

-- Start code
procedure TV_onChange( )
    atom ix
    if deleteItem( LV, -1 ) then end if
    lParams -= lParams
    current = getIndex( TV )

    -- show items

    ix = 1

    while ix <= length( location ) do
        if location[ix] = current then
            lParams[ix] = addLVItem( LV, lv[ix][3], lv[ix][1..2] )
        end if
        ix += 1
    end while
end procedure
onChange[TV] = routine_id( "TV_onChange" )
-- End Code


Matt Lewis

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

Search



Quick Links

User menu

Not signed in.

Misc Menu