Remove scrollbar from a popup window (Vision)

Hello everyone! I would like to know if it were possible to remove the scroll bars that are automatically generated on a popup window of 10000 x 10000 size; I have already implemented the movement by drag and drop of the mouse, so they are useless. Thanks!

I think you can use overflow : hidden in style section of your main container.

Thanks for the reply! Do you know if this solution is good for Vision? Or is it okay just for Perspective?

Only work for perspective

By the how did you manage to pan screen by mouse in vision?

In a popup, I calculate the difference between the initial position of the mouse click and the final one, and then I execute the script that moves the position!

I need to do it on Vision …

Try using Kymera map with no loaded map. and then lock zoom level to 1.(so no one can zoom in more)
Create a template and put your window object in it.
put template on map. your window can be really large and you can drag and pan it on map panel area.
It cost you 2000$ :wink: for map module.

You need to get a reference to the scrollpane (I don’t have a ready way to do this - it’s somewhere in the rendering stack above the root container) and then set the horizontal and vertical ‘scroll bar policy’ to never:
https://docs.oracle.com/javase/tutorial/uiswing/components/scrollpane.html#scrollbars

1 Like

Hi Paul
Do you have any idea how we can have zoom and pan on window vision on runtime? Imagine we have a huge size window and we use full HD LCD and need some how pan and zoom on it.

Zooming, no, I don’t know; I’m not even sure how the designer supports it. Panning, the window object has a scrollRectToVisible() method that you can provide arbitrary viewport dimensions.

2 Likes

Thanks for the answers! I don’t know how to make a script in which I set the ‘scroll bar policy’ to never … can you give me some other suggestions?

I entered the code:

but I always find the same error:

You have to find the existing JScrollPane object that has the scroll bars you wish to hide–you can’t call that method on the class object. I don’t recall the hierarchy–you’ll have to inspect parents/subcomponents to find that layer. It’ll be above the window given by event.source, not in or below the window’s root container.

2 Likes

SOLVED!!

1 Like