I’m new to Servoy, I wanted to try it to see how it performs in comparison to Filemaker. Also, I like the idea of being able to use any type of database.
So, my first project is an Address book.
I learned many things since I started and found my answers on this forum and elsewhere. But now I can’t find what I’m looking for.
In fact, I want to know how events work. I know each object has properties and some has Event actions. But I can’t find any way to create a scroll bar (for a navigation form) with a trigger event when clicked!
Hi, first of all welcome to the Servoy community!
It’s a bit difficult to help you based on your post, can you explain exactly what you are trying to do? I have the feeling that you won’t need any event to handle that scrollbar but I would like some more details to help me help you
You are talking about using Java beans (not Servoy (aware) Beans) here.
You can use/attach events etc. but you have to code everything with… Java, not JavaScript.
Wow! From Filemaker to JavaBeans is quite a good jump!
Why don’t you try to use Servoy builtin tools to start with? They are very powerful and easy to use.
Hello, just to tell you that I found a way to do what I want:
var listener = new Packages.javax.swing.event.MouseInputListener({ mouseDragged: ScrollChange});
elements.ScrollBarNavigate.addMouseMotionListener(listener)
I put that code in the Navigation Form Load event.
The next step is to make the up/down buttons to work in the JScrollBar.
After that, I will face a problem: I would like to make the JScrollBar to work in the Web server.
Hello, I still didn’t find how to make the up/down buttons to work in the JScrollBar.
Any idea?
The main thing I think you could help me is in the type of the event. I wonder if I can add a mouseclicked event on the buttons, or if I need an event on changing the Scroll bar value.
In the image up in this thread, you see at the left:
Standard button “Previous”
JScrollBar bean
Standard checkbox
Standard button “Apply”
Standard button “Next”
Inside the JScrollbar, there are buttons, up and down, can you see them?
Don’t ask me if it’s servoy or Java, you should be able to tell me. If it’s Java, I searched many hours on the web, I didn’t find anything specific to those buttons. There are no tutorials for that!
I suggest that you ask support directly to the Servoy team for this, maybe a good start point would be to create a case in the support system (see the Issues and Bugs forum for the guidelines).
Pretty much all the beans you see in that list are standard Java components. The exceptions would be the DBTreeView bean.
Although you can use these Java components in conjunction with Servoy, knowledge of Java is required to interact with these beans.
As these components are default Java components and not specifically created for/by Servoy, information on these beans can be found on the internet at large. Just google for “JScrollBar” and the JavaDocs for this component will show up at the top of the list.
As to this specific case: I do not think a JScrollBar allows you to bind ActionListeners (easily) to the “buttons” at the top and bottom of the scrollbar, as these buttons are hardcoded to move the scrollbar.
I read a lot on Jscrollbar and the only info I got is we can’t associate up and down buttons to an action. I also found it was not possible to directly generate an event on the scrollbar, but I did. This is why I still search for a way to have the event on the buttons.