Re: Windows values??

new topic     » goto parent     » topic index » view thread      » older message » newer message

sixs wrote:
> 
> Ola!,
> I am wondering  about the values that can be fed to create Windows.
> The first create is using whole numbers
> 
> constant MyWin = createEx( Window, "", 0, Default, Default, 548, 432, 0, 0 )
> This create is using  decimal values.
> constant  Window1  = create(Window, winName, 0,0.2 ,0.2,0.6,0.6,0)
> What is windows doing with the two values. 
> Jvandal

When values between 0 and 1 are used, it refers to the fraction 
corresponding parent dimension. In your example, you are specify a
Window whose left edge begins 20% (0.2) of the screen width, and
the top edge is 20% of the screen height, and the width is 60% of 
the screen width and height is 60% of the screen height. So if your
screen is 800x600 pixels your specification is equivalent to ...

 create(Window, winName, 0, 160, -- 20% of 800
                            120, -- 20% of 600
                            480, -- 60% of 800
                            360, -- 60% of 600
                     0)

There are even more variations available for specifying relative
dimensions. Check out the documentation for the create() routine.

-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu