One of my database fields is labeled Notes and might have a lengthy entry. I would like to have a slider bar bound to the Notes field so that the full entry can be easily read. I added a JSlider bean and have it set up the way I want it but I can’t figure out how to bind it to the notes field. I searched the forum and internet but didn’t have any luck. I guess I don’t know enough about javascript to know what to search for. Any ideas folks?
Servoy 5.2
Java 1.5
Ubuntu 10.04
Does setting the scollbars for the field not work then?
Maybe, maybe not. I’m not sure how to set it. In Properties of that field I can set horizontal and vertical scrollbars to when needed, always, and never. Alway and when needed didn’t seem to do anything and never doesn’t seem applicable. It would make sense to me if there was a property allowing me to select a field to bind the slider to. But there must be another way to do it.
This does work - setting the horizontal scroll bar to when needed as well as the vertical scroll bar.
Have you tried it?
If it does not then submit a case for the issue.
Before I open a ticket I want to be sure I created it correctly. I am new to Servoy. Is it enough to select the field then add bean to associate the jslider with the field?
Make sure your form field is of display type TEXT_AREA. Only then you will see the scrollbars.
I can see the slider and the slider icon “slides” but it doesn’t affect anything. It’s a dressed up with nowhere to go. The display type is set to text_field. I want the slider to scroll through the text in the “Notes” field. Both the field exists and the slider exists but I can’t get them to work together.
I’m starting to think this bean wasn’t intended for what I’m trying to do. Is this bean just to increment a number with a slider?
Hi,
Using the standard Java Swing JSlider bean you would have to create some java callbacks to control the field (which is not that simple), and also have some API to control the field. I don’t think the field has such an API (unless Servoy add that).
But you don’t really need to use the JSlider bean at all. When you have a form field that has the display type set to TEXT_AREA (not TEXT_FIELD) then you can set the scrollbar properties of this field to 'ALWAYS" to make them show at all times (or set them “AS NEEDED” to show them when the text is larger than the field).
If this is not working then something is going on and you should file a bug report.
But first can you check to see if you field properties are set correctly ?
Hope this helps.
Thx ROCLASI. I set the field to TEXT_AREA and the scroll bars appeared and work quite well. I can use in the text box as well to start a new line which is what I wanted but didn’t think was possible. Consider this issue solved.