|
Post by Walt Decker on Jan 2, 2021 9:33:54 GMT -5
Does anyone have a scroll bar widgit or attempted to play around with scroll bars?
|
|
|
Post by honkytonk on Jan 2, 2021 12:47:31 GMT -5
This ?:
nomainwin slide = 50 WindowWidth = 400 WindowHeight = 290 TEXTBOX #w.tex, 50, 50, 40, 20 graphicbox #w.g, 20, 20, 120, 20 statictext #w, "1", 20, 5, 10, 15 statictext #w, "100", 100, 5, 20, 15 open "Silde test" for dialog as #w print #w.g, "home ; up" print #w.g, "fill lightgray" print #w.g, "backcolor black" print #w.g, "down" print #w.g, "line 0 8 120 8" print #w.g, "up" print #w.g, "goto 46 0" print #w.g, "down" print #w.g, "boxfilled 54 17" [main.inputLoop] 'wait here for input event print #w.g, "when leftButtonMove [slide]" wait [slide] print #w.g, "fill lightgray" print #w.g, "down" print #w.g, "line 0 8 120 8" print #w.g, "up" print #w.g, "goto "; MouseX - 4; " "; 0 print #w.g, "down" print #w.g, "boxfilled "; MouseX + 4; " "; 17 slide = MouseX if slide > 100 then slide = 100 if slide < 1 then slide = 1 print #w.tex,str$(slide) wait
Or this ?:
nomainwin WindowWidth = 250 WindowHeight = 300 UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2) texteditor #main.HorTxt, 0, 200, 200, 40 texteditor #main.VertTxt, 200, 0, 40, 200 statictext #main.X, "X", 46, 56, 40, 25 statictext #main.Y, "Y", 102, 56, 40, 20 open "Trying to use scrollbars" for window_nf as #main print #main, "trapclose [quit.main]" print #main, "font courier 10" for i = 1 to 10 #main.HorTxt "1234567890"; for j = 1 to 10 #main.VertTxt j next next #main.VertTxt "!origin 1 1" timer 100, [chk] wait [chk] #main.HorTxt "!origin? X dummy" #main.X X #main.VertTxt "!origin? dummy Y" #main.Y Y wait [quit.main] Close #main END
|
|
|
Post by Walt Decker on Jan 2, 2021 13:40:22 GMT -5
'Fraid not. I am talking about the windows system scroll bars or the windows scrollbar class.
|
|
|
Post by Brandon Parker on Jan 2, 2021 23:12:19 GMT -5
What exactly are you trying to do? Are you trying to scroll different controls as a group?
{:0)
Brandon Parker
|
|
|
Post by Walt Decker on Jan 3, 2021 9:50:01 GMT -5
Scrolling an entire window with the system scroll bars is one possibility, Mr. Parker. The scroll class can be used for other things, e.g. audio controller, color mixer, scrolling a part of a window.
|
|