This is a migrated thread and some comments may be shown as answers.

Page Up/Down

1 Answer 65 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chona
Top achievements
Rank 1
Chona asked on 24 May 2010, 03:02 PM
I am trying to achieve a page up/down functionality for a Point of sale.

Lets say the case where i have a listbox
Achored on all sides, and autoscroll enabled = true

with two bottons Page up / Page down

If I press page down button I want the list box to scroll down by the amount of its height.
How do I do this ?

I tried using for page down

radListBox1.AutoScrollOffset = new Point(0, (-1*radListBox1.AutoScrollOffset.Y)+radListBox1.Height);

I use a positive value for y point because it gets converted into negative and therefore I set the Y offset to a positive by multiplying it by -1.

With very little success.

Thank you in advance

1 Answer, 1 is accepted

Sort by
0
Chona
Top achievements
Rank 1
answered on 25 May 2010, 01:56 PM
I have been able to solve this by using the ListBoxElement property, with this i can also hide the scrollbars.

.ListBoxElement.ScrollLayoutPanel.ScrollTo(0, 20);

Kind Regards
Tags
General Discussions
Asked by
Chona
Top achievements
Rank 1
Answers by
Chona
Top achievements
Rank 1
Share this question
or