I have to load huge (3000x3000) pictures in SWFLoader, and no problems with that — everything works fine. But on low resolution displays (like 1024x768) i can see only a part of picture. So i need some kind of scroll bars to scroll around a picture.
How can I do that? Please help, because i simple have no idea.
Thanks!
SWFLoader extends UIComponent which doesn't support Scrolling.
You can enable scrolling by nesting the SWFLoader in any Container based component, Canvas for example (its horizontalScrollPolicy & verticalScrollPolicy is set to "auto" by default)
Related
I am trying to make this Electron app have an iframe that takes up the entire content area. For the test, I'm setting my resolution to 1920x1080. The content being loaded has a blue div at that same resolution. The app renders tall by a few pixels, which forces two scrollbars. I cannot figure out how to get it to render without the scrollbars at that resolution.
Any help is greatly appreciated.
Test repo:
https://github.com/thomasdunn/electron-fullscreen-iframe-test
The trick was simply to put overflow: hidden on body. It then shows the complete document without scrollbars. Still not sure why this is necessary, but it works.
Is there a way to adjust the thickness of the scrollbars of a WebView using the stylesheet used by the whole JavaFX application?
I am a bit confused since
on the one hand I read that the scrollbars are not part of the JavaFX UI control and therefore can only be customized by a stylesheet set on the web engine (webview.getEngine().setUserStyleSheetLocation(..)) which means I have to write another CSS trying that the scrollbars look like all other scrollbars in the application
and on the other hand I can see that the scrollbars are obviously correctly customized using the JavaFX CSS except the thickness of the scrollbars (and that the vertical scrollbar is always shown even if the loaded page requires no scrollbars at all)
So where am I wrong and which is the correct way to solve this problem?
Thanks in advance!
How is it possible to (automatically) adjust the height of a Flex (4) application at runtime so that only the HTML-page scroll bar is shown, not any Flex scroll bar?
I'm using a ViewStack control which will change always its content. So every time some new content (NavigatorContent controls) is shown (which apparently will have different heights) i want the application height to adjust its height in a way it is reflected in changing only the height of the HTML-page.
I have the slight feeling that this means changing the height of the SWF at runtime! Is this true? If yes how to tell the page ? Is this possible?
I hope i explained my problem as close as possible.
Thanks in advance.
If you haven't already come across a solution to this here's a blog post described a solution for this : http://blog.wezside.co.za/blog/fullscreen-flash-with-browser-scrollbar/
It's a little more then you may be looking for so here's the general gist of it:
Set the embedded swf in the html height to 100%
Then on page change in flash, use an ExternalInterface call to set the height of the container div to your flash content.
Enjoy browser scrolling for your flash/flex app :P
This is the solution which worked (for me)!
I'm working on a Flex 4 application and I started customizing the interface with skins to give a whole new look.
So, I've created two scrollbar skins in Flash Catalyst (one horizontal, one vertical).
Its working great when I test the application through Catalyst so I took it and imported it on Flash Builder, copied the components and defined the new skins in my css file for the HScrollbar and VScrollbar.
The skin is working, all the buttons are ok. But, the scrollbar isnt resizing for some reason. It remains in the same height I've designed it to be regardless of the content it is bound to.
It scrolls the content in all the ways it should be but it doesnt resize and the thumb isnt getting all the way down.
Also I've noticed the following.
I have a custom component acting as a list. It extends Group and contains a Scroller. So at one place of the application the Scrollthumb is getting lower than on another place where the same custom list is used.
I also have to mention that this scroller works perfectly without a custom skin.
Anyone else having similar problems?
Okay, I know you posted this a while ago but I have been scouring the internet for days looking for why the scrollbar's thumb wasn't scaling like the default scrollbar.
There are a couple things to check, first is there a set height on your thumb's skin?
If not, and this is what I was overlooking, go to your scroller skin and at the point where you add the vertical and horizontal scrollbar set the "fixedThumbSize" property to false.
I suppose that your graphic elements are defined as every single part of the scrollbar (top arrow, bottom arrow, track, etc...): in this case you should check that the elements dimensions are not fixed... they should be in % to be able to change the dimensions based on the container.
I have the following problem. I use a custom component for painting a graph on a canvas, now when the windows is resized I want to determine the actual width and height of my canvas to resize the graph as well, therefore I used the resize event I can use in mxml.
Now I detected in my method for resizing I only receive the width and height of the canvas just before resizing not after. When grabbing an edge of my window and moving it slowly for resizing this does not matter but when maximizing or minimizing the windows, this plays a more important role. Can someone tell me the reason for that behaviour? What is the proper solution for that problem?
Thanks in advance
Sebastian
If you use the resize event, you should check the width and height of currentTarget property in the event.