If resize the pub

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Locked
User avatar
Dudus
Posts: 120
Joined: Wed Sep 07, 2005 12:15 pm
Location: Hungary, Budapest

If resize the pub

Post by Dudus »

Hi,

can you help me? How can i align the container when i maximize the pub (resize) ?
Because if I resize the pub the conatiner going on the left top corner of the pub, but i want to lock in center and midle of the pub -even if the pub maximize.

Thank you!
D
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: If resize the pub

Post by Neosoft Support »

You would have to use the Resized action (Book Properties > Actions > Resized) and then use the MoveObject action to manually move the container to the center. You can use the global [ClientHeight] and [ClientWidth] variables to determine the new inside dimensions of the main pub window.
NeoSoft Support
User avatar
Dudus
Posts: 120
Joined: Wed Sep 07, 2005 12:15 pm
Location: Hungary, Budapest

Re: If resize the pub

Post by Dudus »

Neosoft Support wrote:You would have to use the Resized action (Book Properties > Actions > Resized) and then use the MoveObject action to manually move the container to the center. You can use the global [ClientHeight] and [ClientWidth] variables to determine the new inside dimensions of the main pub window.
Thank you for the Help! But do you know how could i count the center midle with the screen resolution?
D
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: If resize the pub

Post by HPW »

Hello,

Take a look at the predefined global variables in the doc:
[ScreenHeight] The height the entire Windows screen in pixels.
[ScreenWidth] The width of the entire Windows screen in pixels.
Regards
Hans-Peter
User avatar
Dudus
Posts: 120
Joined: Wed Sep 07, 2005 12:15 pm
Location: Hungary, Budapest

Re: If resize the pub

Post by Dudus »

I do not know how, so if there is someone who can PAST a code, than please do it... Thanks.

D
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: If resize the pub

Post by HPW »

Code: Select all

Math "[ScreenWidth]/2" "0" "[ScreenMidX]"
Math "[ScreenHeight]/2" "0" "[ScreenMidY]"
Hans-Peter
User avatar
Dudus
Posts: 120
Joined: Wed Sep 07, 2005 12:15 pm
Location: Hungary, Budapest

Re: If resize the pub

Post by Dudus »

Worg great - thank you, BUT how to align to center middle if pub resized back to default size?
Thanks!
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: If resize the pub

Post by HPW »

Code: Select all

Math "[ClientWidth]/2" "0" "[ClientMidX]"
Math "[ClientHeight]/2" "0" "[ClientMidY]"
On the long run you should learn/understand neobooks basic scripting logik. ;-)

Regards
Hans-Peter
User avatar
Dudus
Posts: 120
Joined: Wed Sep 07, 2005 12:15 pm
Location: Hungary, Budapest

Re: If resize the pub

Post by Dudus »

Thank you! :) Works great!!!
Locked