Items of screenRect

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

Items of screenRect

Post by francof » Wed Dec 31, 2014 4:59 pm

Hi all,
I read on the Dictionary about the screenRect function. I've only a little doubt on the Items contents on which I haven't found info:
Item 3 is referred to the height and Item 4 to the width of the screen, is it so?
and Item 1 and 2?

best
franco

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Items of screenRect

Post by Dixie » Wed Dec 31, 2014 5:48 pm

The screenRect takes four integers specifying the left, top, right and bottom of the rectangle (you got item 3 & 4 the wrong way round).... So, 0,0,640,480 would mean the screen is 640 pixels wide by 480 pixels in height...

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: Items of screenRect

Post by dunbarx » Wed Dec 31, 2014 6:00 pm

Hi.

Play around with a control on a card. Retrieve such properties as its loc, width and height, its left, right, topLeft and BottomRight. And all the others. If you have the dimensions of the card, as Dixie pointed out, you can see how all these properties can be derived from and combined with each other.

Now think about how the "screenMouseLoc" relates to all these other properties. This is based on absolute, not screen coordinates.

Craig Newman

francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

Re: Items of screenRect

Post by francof » Wed Dec 31, 2014 6:31 pm

thanks all for your answers,
ok, following the Dixie's example, if my screen is 640 pixels wide and my stack have a width of 700 pixels, means that not all the stack will be visible. to show all the stack I must use the resizing of "fullscreenmode" property.

regards
franco

Post Reply