evoxxx Posted February 15, 2019 Share Posted February 15, 2019 Hello. Sry for my english :d How i can create scrollbar in scrollpane on the left from the text? (now i have scrollpane, scrollbar in right side, and text in child of scrollpane and i want to create scrollbar in left side) Link to comment
Scripting Moderators thisdp Posted February 15, 2019 Scripting Moderators Share Posted February 15, 2019 i am working on a new function to solve your question. As soon as the new function finishes, i will post the method to realize what you want. thanks for your supports. 1 Link to comment
Scripting Moderators thisdp Posted February 19, 2019 Scripting Moderators Share Posted February 19, 2019 wind = dgsCreateWindow(0.2*sW,0,0.4*sW,0.4*sH,"Example Scroll Pane (exclude this window)",false) pane = dgsCreateScrollPane(20,0,200,200,false,wind) dgsScrollPaneSetScrollBarState(pane,false) scrollbar = dgsCreateScrollBar(0,0,20,180,false,false,wind) dgsSetProperty(scrollbar,"theScrollPane",pane) dgsSetProperty(scrollbar,"functions",[[ local scb = dgsScrollPaneGetScrollBar(dgsElementData[self].theScrollPane)[1] dgsElementData[self].multiplier = dgsElementData[scb].multiplier dgsElementData[self].length = dgsElementData[scb].length ]]) addEventHandler("onDgsScrollPaneScroll",pane,function(vertical) dgsScrollBarSetScrollPosition(scrollbar,vertical) end) addEventHandler("onDgsScrollBarScrollPositionChange",scrollbar,function(value) local scbs = dgsScrollPaneGetScrollBar(pane) dgsScrollBarSetScrollPosition(scbs[1],value) end) gdlt = dgsCreateImage(0.5,0,1.1,1.1,_,true,pane,tocolor(255,255,255,255)) gdlt2 = dgsCreateImage(0.1,0,0.7,0.7,_,true,pane,tocolor(0,255,255,255)) With the latest DGS, this is an example to handle your situation. 1 Link to comment
evoxxx Posted May 16, 2019 Author Share Posted May 16, 2019 On 19/02/2019 at 16:40, thisdp said: wind = dgsCreateWindow(0.2*sW,0,0.4*sW,0.4*sH,"Example Scroll Pane (exclude this window)",false) pane = dgsCreateScrollPane(20,0,200,200,false,wind) dgsScrollPaneSetScrollBarState(pane,false) scrollbar = dgsCreateScrollBar(0,0,20,180,false,false,wind) dgsSetProperty(scrollbar,"theScrollPane",pane) dgsSetProperty(scrollbar,"functions",[[ local scb = dgsScrollPaneGetScrollBar(dgsElementData[self].theScrollPane)[1] dgsElementData[self].multiplier = dgsElementData[scb].multiplier dgsElementData[self].length = dgsElementData[scb].length ]]) addEventHandler("onDgsScrollPaneScroll",pane,function(vertical) dgsScrollBarSetScrollPosition(scrollbar,vertical) end) addEventHandler("onDgsScrollBarScrollPositionChange",scrollbar,function(value) local scbs = dgsScrollPaneGetScrollBar(pane) dgsScrollBarSetScrollPosition(scbs[1],value) end) gdlt = dgsCreateImage(0.5,0,1.1,1.1,_,true,pane,tocolor(255,255,255,255)) gdlt2 = dgsCreateImage(0.1,0,0.7,0.7,_,true,pane,tocolor(0,255,255,255)) With the latest DGS, this is an example to handle your situation. Thank you, very much Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now