Page 1 of 1

If resize the pub

PostPosted: Fri Nov 18, 2016 11:24 am
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

Re: If resize the pub

PostPosted: Fri Nov 18, 2016 6:23 pm
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.

Re: If resize the pub

PostPosted: Sat Nov 19, 2016 3:15 am
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

Re: If resize the pub

PostPosted: Sat Nov 19, 2016 7:29 am
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

Re: If resize the pub

PostPosted: Sat Nov 19, 2016 10:35 am
by Dudus
I do not know how, so if there is someone who can PAST a code, than please do it... Thanks.

D

Re: If resize the pub

PostPosted: Sat Nov 19, 2016 11:16 am
by HPW
Code: Select all
Math "[ScreenWidth]/2" "0" "[ScreenMidX]"
Math "[ScreenHeight]/2" "0" "[ScreenMidY]"

Re: If resize the pub

PostPosted: Sun Nov 20, 2016 2:39 am
by Dudus
Worg great - thank you, BUT how to align to center middle if pub resized back to default size?
Thanks!

Re: If resize the pub

PostPosted: Sun Nov 20, 2016 3:59 am
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

Re: If resize the pub

PostPosted: Sun Nov 20, 2016 6:11 am
by Dudus
Thank you! :) Works great!!!