Hi all. I have a ListView:KeyDown method that is to be used to enable
action buttons if there is a resource to action. The method works, but
a key stroke behind.
Scroll down the list with the down arrow, cursor lands on an Item that
has a resource and the action button should enable, but it is not
until the next keydown event that the correct action is observed. The
KeyUp method does not appear to work at all.
Using VO2.5b3 - any suggestions?
Thanks
Tony
METHOD ListViewKeyDown(oListViewKeyEvent) CLASS TopicsWindow
LOCAL oLVI AS ListViewItem
SUPER:ListViewKeyDown(oListViewKeyEvent)
oLVI := oDCLV_Topics:GetSelectedItem() // Get the current Selected
Listview Item.
IF (oLVI != NULL_OBJECT)
SELF:SetButtons(oLVI)
ENDIF
RETURN NIL
METHOD SetButtons(oLVI) CLASS TopicsWindow
IF ! Empty(oLVI:GetValue( #ThrdR ) )
SELF:oCCPB_Test:Enable()
ELSE
SELF:oCCPB_Test:Disable()
ENDIF
IF ! Empty(oLVI:GetValue( #FrthR ) )
SELF:oCCPB_Resource:Enable()
ELSE
SELF:oCCPB_Resource:Disable()
ENDIF
RETURN NIL