OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: Peter2 on July 30, 2018, 08:17:39 AM

Title: 4k: How to handle "Picture box"?
Post by: Peter2 on July 30, 2018, 08:17:39 AM
I have a dialogue with a "picture box" control; the control displays a PNG. On each corner of the picture I have an edit-box. The dialogue should be displayed at 4K and at standard monitor.

Now I made two versions of the dialogue:
- one where all font-settings are set to "pixel size"
- one where all font-settings are set to "monitor scale"

The result on 4k is:
- the position and the fonts of all controls is scalled
- BUT the PNG inside is not scaled
- so all edit-boxes are no more on the corners of the red area

What is wrong? What to do to scale the image too?

Title: Re: 4k: How to handle "Picture box"?
Post by: Peter2 on July 30, 2018, 08:19:22 AM
And here attached the ODCL and Lisp
Title: Re: 4k: How to handle "Picture box"?
Post by: Peter2 on August 07, 2018, 05:38:08 AM
Wake up call (yes, I know - it's by John Mayall)

Who knows how to handle images / pictures integrated in ODCL to fit to different resolutions on different monitors?
Title: Re: 4k: How to handle "Picture box"?
Post by: owenwengerd on September 09, 2018, 03:07:01 PM
I think the only reliable solution is to make sure the picture size exactly matches the control size, enable Auto Size for the picturebox control, then move the edit box controls at runtime to hard-coded positions relative to the picturebox. Alternatively you could load the image from a file with (dcl-PictureBox-LoadPictureFile) and set the Stretch argument to T in order to stretch the image to fit the control (but scaling images can cause poor image quality).
Title: Re: 4k: How to handle "Picture box"?
Post by: Peter2 on September 10, 2018, 12:39:18 PM
Thank you Owen - I will test.