RE: Win32LIB V0.57.4 LV onClick

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

Derek Parnell wrote:
> ----- Original Message -----
> From: "Tony Steward" <tony at locksdownunder.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Thursday, May 09, 2002 5:52 PM
> Subject: Win32LIB V0.57.4 LV onClick
> 
> 
> > Hi all,
> > Found my bug in listviews using old winlib and am now looking at new
> > winlib and found that not many changes were needed at all but for
> > somereason my program does not seem to respond/trigger the onClick
> > routine with the new version.
> >
> > Any ideas why this might be? The changes that I found i had to make were
> > not in this routine and would not be the cause.
> 
> I've done some checking with earlier versions of win32lib and none have 
> ever
> supported an onClick event for ListViews. There is an onChange event, 
> but
> never has been an onClick event. Am I understanding your problem 
> correctly?
> 
> I've coded a trap for the LVM_ITEMACTIVATE message but that only seems 
> to
> fire for a double-click.
> 
> The Click is usually detected by the library when a LeftDown and a 
> LeftUp
> event occur in roughly the same screen location at roughly the same 
> time.
> However, for ListViews, the LeftDown is detected but there is no 
> matching
> LeftUp. I suspect that the ListView control traps it. If you really need
> one, I'll try to work out how to do it.
> 
> 
> > BTW I wish the docs for the LV procedures/functions in the new winlib
> > were a little more detailed. Sorry for nit picking its a great
> > programing tool and without it I probably wouldn't bother.
> 
> Me too. I'm doing a little bit at a time. Please be patient with me.
> -----------
> Derek.
> 
> 
Hi Derek,
Of corse I'll be patient, WIN32LIB allows me to do things I'd never be 
capable of doing.

My program has the following procedure then works fine with win32lib 
0.55.? but for some reason won't even trigger if I use the new win32lib.

procedure PersLV_onClick ()
    sequence listdata
    integer recnum

    PersSelected = getLVSelected(PersLV)
    eraseItems(PersKeysHeldLV)
    PersKeysHeldLVID = {}
    if length(PersSelected) then
        PersKey = getLVItemText(PersLV, PersSelected[1], 1)
        SelectTable("Personnel")
        recnum = db_find_key(PersKey)
        if recnum < 1 then
            setText(SBar, "Could not find data for " & PersKey)
        else
            PersData = db_record_data(recnum)
            SelectTable("ComKey")
            if length(PersData[1]) > 0 then
                for key = 1 to length(PersData[1]) do
                    recnum = db_find_key(getNameA(PersData[1][key]))
                    if recnum < 1 then
                        setText(SBar, "Couldn find key " & 
PersData[1][key])
                    else
                        ComKeyData = db_record_data(recnum)
                        listdata = {getNameA(PersData[1][key]), 
getIssueA(PersData[1][key])}
                        listdata &= {ComKeyData[1]}
                        PersKeysHeldLVID &= addLVItem(PersKeysHeldLV, 0, 
listdata)
                    end if
                end for
                setEnable(PersDeleteButton, False)
            else
                if length(PersSelected) > 1 then
                    setEnable(PersDeleteButton, False)
                else
                    setEnable(PersDeleteButton, True)
                end if
            end if
        end if
        setEnable({PersEditButton, PersIssueButton, PersHistoryButton}, 
True)
    else
        setEnable({PersEditButton, PersDeleteButton, PersIssueButton, 
PersHistoryButton}, False)
    end if
end procedure
onClick[PersLV]=routine_id("PersLV_onClick")

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

Search



Quick Links

User menu

Not signed in.

Misc Menu