Welcome! Log In Create A New Profile

Advanced

JP: [WD23] - Scrollabe Image on a Window

Posted by harvey68 
JP: [WD23] - Scrollabe Image on a Window
September 08, 2018 06:14PM
Autor: JP

Link zum Beitrag: [27130.foren.mysnip.de]

Hi All

I want to put an image control on a window. The image can be larger than
the window so I want the window to have scrollbars so that the user can
scroll the image up/down and left/right to see it all.

So I add the image control to a test window. The image is larger than
the window. I switch on Automatic Scrollbars for the window. But when I
run the test the window shows no scrollbars and the only way to see more
of the image is to resize the window.

What am I missing?
Art Bonds: [WD23] - Scrollabe Image on a Window
September 08, 2018 06:15PM
Autor: Art Bonds

Link zum Beitrag: [27130.foren.mysnip.de]

Enquiring minds would like to know...
JP: [WD23] - Scrollabe Image on a Window
September 08, 2018 06:16PM
Autor: JP

Link zum Beitrag: [27130.foren.mysnip.de]

Art,

You need to set the window width/height in design mode to some "large"
value (whatever you like to be the maximum width/height the window
should/can handle). Switch auto-scrollbars on. Then when the window is
created you change the width/height to something smaller in the
initialization code of the window or the instance creation code of the
window. This change makes WD switch on the scrollbars for the window
because WD has been told the window must handle a larger area.

Then the image control on the window you set to just 100%, top left
corner, no resize or anchoring. If the image control is larger than the
visible window area then you can use the window scrollbars to view it.
If it is smaller than the visible window area then you obviously will
see it all without scrolling.
Art Bonds: [WD23] - Scrollabe Image on a Window
September 08, 2018 06:17PM
Autor: Art Bonds

Link zum Beitrag: [27130.foren.mysnip.de]

Thanks JP!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: