mastercontrol
Programmer
Hi,
I need to make row selection without using mouse, only keyboard, - KeyShift! AND KeyDownArrow! OR KeyUpArrow!.
I found for clicked event, but not for keyboard use:
ll_selectedrow = getselectedrow(0)
// select range
IF KeyDown(keyShift!) THEN
IF ll_selectedrow = 0 THEN
This.SelectRow(row, True)
ELSE
This.SelectRow(1, False)
IF row > ll_selectedrow THEN
FOR ll_rc = ll_selectedrow TO row
This.SelectRow(ll_rc, True)
NEXT
ELSE
FOR ll_rc = row TO ll_selectedrow
This.SelectRow(ll_rc, True)
NEXT
END IF
END IF
// multi select
ELSEIF KeyDown(keyControl!) THEN
IF This.IsSelected(row) THEN
This.SelectRow(row, False)
ELSE
This.SelectRow(row, True)
END IF
// single select
ELSE
IF This.IsSelected(row) THEN
This.SelectRow(0, False)
This.SelectRow(row, True)
ELSE
This.SelectRow(0, False)
This.SelectRow(row, True)
END IF
END IF
I;m pretty new in Powerbuilder use, so it's still hard to make it clear.
P.S. Please help! Urgent!
I need to make row selection without using mouse, only keyboard, - KeyShift! AND KeyDownArrow! OR KeyUpArrow!.
I found for clicked event, but not for keyboard use:
ll_selectedrow = getselectedrow(0)
// select range
IF KeyDown(keyShift!) THEN
IF ll_selectedrow = 0 THEN
This.SelectRow(row, True)
ELSE
This.SelectRow(1, False)
IF row > ll_selectedrow THEN
FOR ll_rc = ll_selectedrow TO row
This.SelectRow(ll_rc, True)
NEXT
ELSE
FOR ll_rc = row TO ll_selectedrow
This.SelectRow(ll_rc, True)
NEXT
END IF
END IF
// multi select
ELSEIF KeyDown(keyControl!) THEN
IF This.IsSelected(row) THEN
This.SelectRow(row, False)
ELSE
This.SelectRow(row, True)
END IF
// single select
ELSE
IF This.IsSelected(row) THEN
This.SelectRow(0, False)
This.SelectRow(row, True)
ELSE
This.SelectRow(0, False)
This.SelectRow(row, True)
END IF
END IF
I;m pretty new in Powerbuilder use, so it's still hard to make it clear.
P.S. Please help! Urgent!