Sheet on window ( landscape )

Just starting out? Need help? Post your questions and find answers here.
User avatar
VisualJump3D
User
User
Posts: 75
Joined: Thu Jun 23, 2011 8:32 pm
Location: italy
Contact:

Sheet on window ( landscape )

Post 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 ?
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Sheet on window ( landscape )

Post 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.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
VisualJump3D
User
User
Posts: 75
Joined: Thu Jun 23, 2011 8:32 pm
Location: italy
Contact:

Re: Sheet on window ( landscape )

Post by VisualJump3D »

Thank !

This night i work !
Post Reply