Scrollbar "win style" using a pen: down-down

vangogh

Active Member
Licensed User
Longtime User
I am now using an Android device with resistive screen, so I use a pen (not fingers) to scroll in a long list.
In a listview, when I need to "go down" in the list, It is not confortable to scroll with the pen "swiping up", as I would do with my finger on a resistive screen, if the list is long...

I would like to have a scrollbar "pc style": I "go down" on the scrollbar and the list "goes down" consequentially... as anybody do using a pc's scrollbar

How can I do that?

Thank you
 

vangogh

Active Member
Licensed User
Longtime User
vertical seekbar

mmmm now I miss a vertical seekbar... :sign0148:


I don't need a "beautiful graphic" seek bar like the horizontal one, but simply a "working" vertical seekbar.

what is the best way to do it? a simple panel, with a "clicked-here" event?
 
Upvote 0

vangogh

Active Member
Licensed User
Longtime User
I did it using a panel as "scrollbar" and a small panel, inside, that I use as the "currenti position" marker

thank you
:sign0188:
 
Upvote 0

DouglasNYoung

Active Member
Licensed User
Longtime User
vangogh,
Using a ListView you could simply use ListView's FastScroll Property:

e.g.

lv.FastScrollEnabled = True

(Assuming your ListView is decalred as lv)

Douglas
 
Upvote 0

vangogh

Active Member
Licensed User
Longtime User
I put a thin panel on the right of my listview, with a small panel that is like a "marker"


- pnlScrollBarProd = the panel
- pnlScrollBarProdPosAttuale = a "marker" that indicate the current position
- grdProdotti = the listview


Sub pnlScrollBarProd_Touch (Action As Int, X As Float, Y As Float)
Dim PosPercento As Int ' % relative position


PosPercento=(pnlScrollBarProdPosAttuale.Top * 100 / (pnlScrollBarProd.Height-pnlScrollBarProdPosAttuale.Height))

pnlScrollBarProdPosAttuale.Top=Y-pnlScrollBarProdPosAttuale.Height/2
If pnlScrollBarProdPosAttuale.Top<0 Then pnlScrollBarProdPosAttuale.Top=0 ' to the top
If pnlScrollBarProdPosAttuale.Top+pnlScrollBarProdPosAttuale.Height>pnlScrollBarProd.Height Then pnlScrollBarProdPosAttuale.Top=pnlScrollBarProd.Height-pnlScrollBarProdPosAttuale.Height ' to the bottom

grdProdotti.SetSelection (PosPercento * (grdProdotti.Size-9) / 100) ' moves the current listview's position

' note: -9 when you have 9 items visible in you screen at the same time...

End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…