Page 1 of 1
LM_ScrollBar - anyone know how to use it?
Posted: Fri Feb 01, 2013 8:49 am
by Stan
Version 9.2 added a new LM.GUI class -
LM_ScrollBar. Does it mean that we can now create scrollable dialog elements?
Re: LM_ScrollBar - anyone know how to use it?
Posted: Fri Feb 01, 2013 10:48 am
by videodv
not sure about the scroll bar but here is the setup for sliders
The first parameter: length of slider
The second parameter: horizontal = false - vertical = true
The third parameter: no ticks = false - show ticks = true
The last is the usual Constant message
d.slider = LM.GUI.Slider(250, false, false, cw_basic_tool_bar.SLIDER)
d.slider:SetRange(0, 100)
l:AddChild(d.slider)
Regards
Chris.
Re: LM_ScrollBar - anyone know how to use it?
Posted: Fri Feb 01, 2013 11:35 am
by videodv
Here is the basic scroll bar setup
self.scrollbara = LM.GUI.ScrollBar(200, false, cw_slider_test.SCROLLBAR) -- Length of scroll bar
self.scrollbara:SetRange(0, 200) -- initial range
layout:AddChild(self.scrollbara)
Regards
Chris.
Re: LM_ScrollBar - anyone know how to use it?
Posted: Fri Feb 01, 2013 11:47 am
by Stan
Yeah, but what can be scrolled with it, and how?
Re: LM_ScrollBar - anyone know how to use it?
Posted: Fri Feb 01, 2013 12:11 pm
by videodv
Stan wrote:Yeah, but what can be scrolled with it, and how?
Just about anything that is animatable.
How? you need to have a look at some code if you are new to scripting there is plenty about.
Regards
Chris.
Re: LM_ScrollBar - anyone know how to use it?
Posted: Fri Feb 01, 2013 1:56 pm
by Stan
If so, then what is the point of having LM_Slider class and LM_ScrollBar class together?
I think that scroll bars aren't suppose to be used for controlling animatable things, they are for scrolling GUI elements. Take a look at this scrollable element in the InsertText GUI:
See, the scroll bars are controlling the position of the rectangular element inside the GUI window. And that element itself contains other elements inside - static texts, sliders, text controls.
Re: LM_ScrollBar - anyone know how to use it?
Posted: Fri Feb 01, 2013 2:35 pm
by videodv
Sorry I should have said animatable or controlable.
Regards
Chris.
Re: LM_ScrollBar - anyone know how to use it?
Posted: Fri Feb 01, 2013 4:41 pm
by Stan
videodv wrote:Sorry I should have said animatable or controlable.
Maybe you know where to find an example? InsertText tool is hardcoded.
Re: LM_ScrollBar - anyone know how to use it?
Posted: Sat Feb 02, 2013 1:51 am
by videodv
Stan wrote:Maybe you know where to find an example? InsertText tool is hardcoded.
Just have alook at the scripts that came with the programe it will get you started.
Regards
Chris.
Re: LM_ScrollBar - anyone know how to use it?
Posted: Sat Feb 02, 2013 8:12 am
by Stan
videodv wrote:
Just have alook at the scripts that came with the programe it will get you started.
Man, which one? Tell me, which of them is written in Lua and uses LM_ScrollBar? If such a script exists, I'd be more than happy to take a look.
Re: LM_ScrollBar - anyone know how to use it?
Posted: Sat Feb 02, 2013 9:23 am
by videodv
Stan wrote:
Man, which one? Tell me, which of them is written in Lua and uses LM_ScrollBar? If such a script exists, I'd be more than happy to take a look.
They are all written in lua but none of them have sliders or scroll bar examples you have to program them in yourself at this time(see script insert above)
Are you new to scripting ASP? If so and you need a simple example I will upload one for you to get you started.
Regards
Chris.
Re: LM_ScrollBar - anyone know how to use it?
Posted: Sat Feb 02, 2013 10:57 am
by Stan
videodv wrote:
They are all written in lua but none of them have sliders or scroll bar
There are sliders and scroll bars in the InsertText tool, but they are not created with Lua.
I'm not new to scripting and I don't need a simple example, thanks.
Here is my question: Is it possible to make a
scrollable gui container with Lua, and if it is, then how?
If you don't know the answer, please don't say anything.
Re: LM_ScrollBar - anyone know how to use it?
Posted: Sat Feb 02, 2013 11:26 am
by videodv
Just trying to be helpful
Bye