PDA

View Full Version : Paragraphs and fullscreen projects


abcnormal
12-20-2005, 07:32 PM
Hi,
I have tested the product for some hours now, and I have some small problems:

I added a paragraph to a page, and the project is set to 800 x 600 pixels.
If I run a code for setting the screensize for the project to be fullscreen, the paragraph is not placed where I want it to be. It is stuck on the paragraphs own pixel settings (in the properties), not relative to the actual pages size.
How can I get the paragraphs to move accordingly, if I change the screensize for the projects?
Since I never know what screensize the end user is using, and my client want to have a fullscreen presentation, I need to be able to set this somehow.

Code added to On startup for a page:
-- Get the user's screen size
screen_info = System.GetDisplayInfo();

-- set the application size to same as screen size
Window.SetSize(Application.GetWndHandle(this), screen_info.Width, screen_info.Height-10);

-- position application window to top left
Window.SetPos(Application.GetWndHandle(this), 0, 0);
Window.SetSize(Application.GetWndHandle(this), screen_info.Width, screen_info.Height-10);
------------

If anyone has some good answers for me, please let me know. Thanks.

Intrigued
12-20-2005, 07:59 PM
Here is a very basic idea (there is no less than one other way to do this and do it better. But, I have to get up early and this is the best I can do inside of about five minutes).

Here's the code and then a sample project (code in that project is in the On Click of the Label object)

Code:

--[[
Code added to On startup for a page:
]]
-- Get the user's screen size
screen_info = System.GetDisplayInfo();

-- set the application size to same as screen size
Window.SetSize(Application.GetWndHandle(this), screen_info.Width, screen_info.Height-Math.Random(200, 500)); -- testing purposes

-- position application window to top left
Window.SetPos(Application.GetWndHandle(this), 0, 0);
Window.SetSize(Application.GetWndHandle(this), screen_info.Width, screen_info.Height-Math.Random(200, 500)); -- testing purposes

---

WS = Window.GetSize(Application.GetWndHandle(this))


Paragraph.SetPos("Paragraph1", 0, WS.Height-110)