Screen Postion???

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Screen Postion???

Ban Nguyen
Hello,

I am creating an application which has one main stack and 5 substacks. I
lock the size and location using property inspector BUT when I view the
application on different computers with different screen setting those 5
substacks are displayed in different locations

The problem is I don't know how to set the location for those 5
substacks so they are displayed in the right position that I set so I
don't have to worry about other users' computer screen setting.

Thank you
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Screen Postion???

Eric Chatonet
Hi Ban,

You could try to set the position of your stacks relative to the  
screenRect value in a preOpenStack handler in your main stack.
For instance:

on preOpenStack
   local tCurLoc
   -----
   put the screenLoc into tCurLoc
   set the loc of this stack to tCurLoc
   repeat with i = 1 to 5
     add x to item 1 of tCurLoc -- horizontal co-ordinate
     add y to item 2 of tCurLoc -- vertical co-ordinate
     set the loc of stack  item i of  "MySubstack1, MySubstack2, etc"  
to tCurLoc
   end repeat
end preOpenStack

Such a handler will present the main stack centred on- screen and the  
others in cascade according to x and y values.
Of course, you can change all that to suit your needs (working for  
instance with the screenRect too).
It's just to get you the idea.

Le 21 juil. 05 à 19:15, Ban Nguyen a écrit :

> I am creating an application which has one main stack and 5  
> substacks. I
> lock the size and location using property inspector BUT when I view  
> the
> application on different computers with different screen setting  
> those 5
> substacks are displayed in different locations
>
> The problem is I don't know how to set the location for those 5
> substacks so they are displayed in the right position that I set so I
> don't have to worry about other users' computer screen setting.

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [hidden email]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Screen Postion???

Klaus major-k
In reply to this post by Ban Nguyen
Hi Ban,

> Hello,
>
> I am creating an application which has one main stack and 5  
> substacks. I
> lock the size and location using property inspector BUT when I view  
> the
> application on different computers with different screen setting  
> those 5
> substacks are displayed in different locations
>
> The problem is I don't know how to set the location for those 5
> substacks so they are displayed in the right position that I set so I
> don't have to worry about other users' computer screen setting.

Well, what is the question actually???
How to set the position of your stacks?

You can do so on "preopenstack" preferrably...

To center a stack in the middel of the (ANY) screen:

on preopenstack
   set the loc of this stack to the screenloc
...
end preopenstack

To open a stack somewhere else, you can compute the necessary and
available loc by yourself ;-)

"The loc" means "the center" of your stack!

Please remember to add about*** 30 pixel for the window title and  
another
30 pixel for the Mac menubar, in case you are working on/for a mac...

***It is a bit less, but I idon't have the correct sizes at hand.

So to open a stack e.g. in the topleft corner of ANY windows! monitor  
you can:

on preopenstack
   put round(the width of this stack/2) into new_xloc
   put round(the height of this stack/2 + 30) into new_yloc
   ## add some pixel, so the window title will not be hidden!
   set the loc of this stack to new_xloc,new_yloc
...
end preopenstack

You get the picture.

Hope that helps...

> Thank you

You are welcome :-)


Regards

Klaus Major
[hidden email]
http://www.major-k.de

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Screen Postion??? Eric strikes again :-)

Klaus major-k
In reply to this post by Eric Chatonet
Hi Eric,

> Hi Ban,
>
> You could try to set the position of your stacks relative to the  
> screenRect value in a preOpenStack handler in your main stack.
> For instance:
>
> on preOpenStack
>   local tCurLoc
>   -----
>   put the screenLoc into tCurLoc
>   set the loc of this stack to tCurLoc
>   repeat with i = 1 to 5
>     add x to item 1 of tCurLoc -- horizontal co-ordinate
>     add y to item 2 of tCurLoc -- vertical co-ordinate
>     set the loc of stack  item i of  "MySubstack1, MySubstack2,  
> etc" to tCurLoc
>   end repeat
> end preOpenStack
>
> Such a handler will present the main stack centred on- screen and  
> the others in cascade according to x and y values.
> Of course, you can change all that to suit your needs (working for  
> instance with the screenRect too).
> It's just to get you the idea.
>
> Le 21 juil. 05 à 19:15, Ban Nguyen a écrit :
>
>
>> I am creating an application which has one main stack and 5  
>> substacks. I
>> lock the size and location using property inspector BUT when I  
>> view the
>> application on different computers with different screen setting  
>> those 5
>> substacks are displayed in different locations
>>
>> The problem is I don't know how to set the location for those 5
>> substacks so they are displayed in the right position that I set so I
>> don't have to worry about other users' computer screen setting.
>>
>
> Best Regards from Paris,
>
> Eric Chatonet.
> ----------------------------------------------------------------
> So Smart Software
>
> For institutions, companies and associations
> Built-to-order applications: management, multimedia, internet, etc.
> Windows, Mac OS and Linux... With the French touch
>
> Free plugins and tutorials on my website
> ----------------------------------------------------------------
> Web site        http://www.sosmartsoftware.com/
> Email        [hidden email]/
> Phone        33 (0)1 43 31 77 62
> Mobile        33 (0)6 20 74 50 86

DAMN, i'm way too slow :-D


Best

Klaus Major
[hidden email]
http://www.major-k.de

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Screen Postion???

Ban Nguyen
In reply to this post by Ban Nguyen

I am trying to use this code and I give me an error:

      executing at 10:45:16 AM
Type Chunk: can't find stack
Object main
Line set the loc of stack item i of "partners, aboutUs, location,
contact" to tCurLoc
Hint stack "main.rev"


-------------------------------------
You could try to set the position of your stacks relative to the  
screenRect value in a preOpenStack handler in your main stack.
For instance:

on preOpenStack
   local tCurLoc
   -----
   put the screenLoc into tCurLoc
   set the loc of this stack to tCurLoc
   repeat with i = 1 to 5
     add x to item 1 of tCurLoc -- horizontal co-ordinate
     add y to item 2 of tCurLoc -- vertical co-ordinate
     set the loc of stack  item i of  "MySubstack1, MySubstack2, etc"  
to tCurLoc
   end repeat
end preOpenStack

Such a handler will present the main stack centred on- screen and the  
others in cascade according to x and y values.
Of course, you can change all that to suit your needs (working for  
instance with the screenRect too).
It's just to get you the idea.

---------------------------------------------------------

> I am creating an application which has one main stack and 5  
> substacks. I
> lock the size and location using property inspector BUT when I view  
> the
> application on different computers with different screen setting  
> those 5
> substacks are displayed in different locations
>
> The problem is I don't know how to set the location for those 5
> substacks so they are displayed in the right position that I set so I
> don't have to worry about other users' computer screen setting.

-
-
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Screen Postion???

Thomas McGrath III
set the loc of stack (item i of "partners, aboutUs, location, contact")
to tCurLoc

or better yet

put item i of "partners, aboutUs, location, contact" into tmystack
set the loc of stack tmystack to tcurLoc

unless of course the tCurLoc does not have full coordinates in it???

Tom McGrath

On Jul 21, 2005, at 1:48 PM, Ban Nguyen wrote:

>
> I am trying to use this code and I give me an error:
>
>       executing at 10:45:16 AM
> Type Chunk: can't find stack
> Object main
> Line set the loc of stack item i of "partners, aboutUs, location,
> contact" to tCurLoc
> Hint stack "main.rev"
>
>
> -------------------------------------
> You could try to set the position of your stacks relative to the
> screenRect value in a preOpenStack handler in your main stack.
> For instance:
>
> on preOpenStack
>    local tCurLoc
>    -----
>    put the screenLoc into tCurLoc
>    set the loc of this stack to tCurLoc
>    repeat with i = 1 to 5
>      add x to item 1 of tCurLoc -- horizontal co-ordinate
>      add y to item 2 of tCurLoc -- vertical co-ordinate
>      set the loc of stack  item i of  "MySubstack1, MySubstack2, etc"
> to tCurLoc
>    end repeat
> end preOpenStack
>
> Such a handler will present the main stack centred on- screen and the
> others in cascade according to x and y values.
> Of course, you can change all that to suit your needs (working for
> instance with the screenRect too).
> It's just to get you the idea.
>
> ---------------------------------------------------------
>
>> I am creating an application which has one main stack and 5
>> substacks. I
>> lock the size and location using property inspector BUT when I view
>> the
>> application on different computers with different screen setting
>> those 5
>> substacks are displayed in different locations
>>
>> The problem is I don't know how to set the location for those 5
>> substacks so they are displayed in the right position that I set so I
>> don't have to worry about other users' computer screen setting.
>
> -
> -
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>


Macintosh PowerBook G-4 OSX 10.3.9, OS 9.2.2, 1.25 GHz, 512MB RAM, Rev
2.6


Advanced Media Group
Eagle Works Art & Sculpture
Semantic Compaction Systems
Prentke Romich Company
Prentke Romich International
SCIconics, LLC
Artist
Thomas J McGrath III
[hidden email]



_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution