LM_ScrollBar - anyone know how to use it?
Moderators: Víctor Paredes, Belgarath, slowtiger
LM_ScrollBar - anyone know how to use it?
Version 9.2 added a new LM.GUI class - LM_ScrollBar. Does it mean that we can now create scrollable dialog elements?
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
Re: LM_ScrollBar - anyone know how to use it?
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.
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?
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.
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?
Yeah, but what can be scrolled with it, and how?
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
Re: LM_ScrollBar - anyone know how to use it?
Just about anything that is animatable.Stan wrote:Yeah, but what can be scrolled with it, and how?
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?
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.
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.
Last edited by Stan on Fri Feb 01, 2013 11:40 pm, edited 2 times in total.
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
Re: LM_ScrollBar - anyone know how to use it?
Sorry I should have said animatable or controlable.
Regards
Chris.
Regards
Chris.
Re: LM_ScrollBar - anyone know how to use it?
Maybe you know where to find an example? InsertText tool is hardcoded.videodv wrote:Sorry I should have said animatable or controlable.
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
Re: LM_ScrollBar - anyone know how to use it?
Just have alook at the scripts that came with the programe it will get you started.Stan wrote:Maybe you know where to find an example? InsertText tool is hardcoded.
Regards
Chris.
Re: LM_ScrollBar - anyone know how to use it?
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.videodv wrote: Just have alook at the scripts that came with the programe it will get you started.
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
Re: LM_ScrollBar - anyone know how to use it?
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)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.
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?
There are sliders and scroll bars in the InsertText tool, but they are not created with Lua.videodv wrote: They are all written in lua but none of them have sliders or scroll bar
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.
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
Re: LM_ScrollBar - anyone know how to use it?
Just trying to be helpful
Bye
Bye