Oh forgot to post back, I got a scroll bar working, i am currently trying to get it into my GUI functions, but here is the test i used. you can rem out the up and down key controls and unrem the mouse controls. either way works but both together doesn't
sync on
sync rate 0
contenthumbH# = 1000.0
viewH# = 100.0
scrollbarH# = 100.0
thumbH# = (viewH# / contenthumbH#) * scrollbarH#
thumbY# = 0.0
create bitmap 1,250,1050
sentance$ = "WORDSWORDSWORDSWORDSWORDS!"
for x=0 to 1000/20-1
if x=1000/20-1 then sentance$ = "LASTWORD!"
text 0,x*20,sentance$
next x
get image 1,0,0,200,1000
delete bitmap 1
do
remstart for my control
if mousey() >= 0 and mousey() <= (scrollbarH#-thumbH#)
thumbY# = mousey()
vy# = ( (thumbY# / (scrollbarH#-thumbH#)) * (contentH#-viewH#) ) * -1
endif
remend
if upkey() and thumbY# > 0.0 then thumbY# = thumbY# - 1.0
if downkey() and thumbY# < (scrollbarH#-thumbH#) then thumbY# = thumbY# + 1.0
vy# = ( (thumbY# / (scrollbarH#-thumbH#)) * (contenthumbH#-viewH#) ) * -1
paste image 1,0,vy#
ink rgb(255,0,255),0
box 200,thumbY#,232,thumbY#+thumbH#
ink rgb(0,0,0),0
box 0, 101,500,479
sync
cls
loop
New Site! Check it out \/