4k: How to handle "Picture box"?

Started by Peter2, July 30, 2018, 08:17:39 AM

Previous topic - Next topic

Peter2

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?

Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

Peter2

And here attached the ODCL and Lisp
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

Peter2

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?
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

owenwengerd

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).
Owen Wengerd (Outside The Box) / ManuSoft

Peter2

Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10