Page 1 of 1
Sheet on window ( landscape )
Posted: Mon Sep 22, 2014 2:33 pm
by VisualJump3D
Hi !
How can I create a virtual sheet (A4-Landscape), (with the right proportions)
inside a window
where I can add text and image-gadget , and i can drag/drop it ?
Re: Sheet on window ( landscape )
Posted: Mon Sep 22, 2014 3:02 pm
by IdeasVacuum
Probably then your best bet is to represent the sheet of paper with a ContainerGadget()
To size it correctly, you need to know the DPI of the monitor. If your app is for Windows, you can use:
Code: Select all
DPI_X = GetDeviceCaps_(GetDC_(GetDesktopWindow_()), #LOGPIXELSX)
DPI_Y = GetDeviceCaps_(GetDC_(GetDesktopWindow_()), #LOGPIXELSY)
On most monitors DPI_X and DPI_Y are the same. Most are 96DPI = 3.77952 pix per mm
So, your A4 sheet (Container) would be 1123pix x 794pix (297mm x 210mm)
Here is how to add gadgets onto your sheet at run time:
Resize / move Gadgets with mouse Scroll down to the code by Shardik. It works in a similar way to a Form/Window designer.
Re: Sheet on window ( landscape )
Posted: Mon Sep 22, 2014 3:06 pm
by VisualJump3D
Thank !
This night i work !