string ls_KeyDownType
If rrow <= 0 then Return 0
If Keydown(KeyShift!) then
integer li_Idx
al_aclickedrow=rrow
this.setredraw(false)
this.selectrow(0,false)
If il_lastclickedrow = 0 then
this.setredraw(true)
Return 1
end if
if il_lastclickedrow > al_aclickedrow then
For li_Idx = il_lastclickedrow to al_aclickedrow STEP -1
this.selectrow(li_Idx,TRUE)
end for
else
For li_Idx = il_lastclickedrow to al_aclickedrow
this.selectrow(li_Idx,TRUE)
next
end if
this.setredraw(true)
Return 1
////////////////
ElseIf this.IsSelected(rrow) Then
il_LastClickedRow = rrow
ib_action_on_buttonup = true
ElseIf Keydown(KeyControl!) then
il_LastClickedRow = rrow
this.SelectRow(rrow,TRUE)
If ib_action_on_buttonup Then
ib_action_on_buttonup = false
If Keydown(KeyControl!) then
this.selectrow(il_lastclickedrow,FALSE)
Else
this.SelectRow(0,FALSE)
this.SelectRow(il_lastclickedrow,TRUE)
End If
il_lastclickedrow = 0
End If
If KeyDown ( keycontrol! ) Then
If This.IsSelected(row) Then
This.SelectRow(row,False)
Else
This.SelectRow(row,True)
End If
Else
This.SelectRow(0,False)
This.SelectRow(row,True)
This.SetRow(row)
End If
一个问题开俩帖子。你分很多啊。而且这段代码网上很容易搜出来!呵呵