Re: setLVTextItem - Help Needed Still

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

Tony,
below is the corrected routine from Matt Lewis. His original routine had a
couple of bugs.

--/topic ListView Control
--/proc changeLVItemText( lv, item, column, text )
global procedure changeLVItemText( integer LV, integer item,
                                   integer subitem, sequence text )
    atom hWnd

    subitem += 1
    release_mem( lvitem_data[item][2][subitem][1] )

    lvitem_data[item][2][subitem][1] = acquire_mem(0,  text)
    lvitem_data[item][2][subitem][2] = length( text)

    hWnd = getHandle( LV )

    -- invalidate all of the current window, and clear it
    VOID = w32Func( xInvalidateRect, {hWnd, NULL, 1} )

    -- trigger an immediate paint message
    VOID = w32Func( xSendMessage, { hWnd, WM_PAINT, 0, 0 } )

end procedure


------
Derek Parnell
Melbourne, Australia
"To finish a job quickly, go slower."

----- Original Message -----
From: "Tony Steward" <figjam at nlc.net.au>
To: "EUforum" <EUforum at topica.com>
Sent: Tuesday, January 02, 2001 9:41 AM
Subject: setLVTextItem - Help Needed Still


>
>
> Hi all,
> A while ago I asked how can I change the text of the selected row in a
list
> view in a predefined column.
>
> Matt Lewis suggested using changeLVItemText(), but I see no such command.
>
> Derek I tried your suggestion to no avail.
>
> Please look at attached code which is a simple to do list I knocked up so
> someone can show me how to change the text. The idea is select a list view
> item click Done button and last column changes to "Done"
>
> Can anyone help please as this is holding up a large prog I am writing, at
> the moment I am re-reading the whole list and when it contains in excess
of
> 1000 lines it takes too long. Especially when all I want to do is change
one
> word.
>
> Thanks
>
> Tony Steward
>
> Come Visit Me At www.locksdownunder.com
>
>
>
>
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu