Source language: Translate to:

The maximum size of the main window

General questions about NeoBook

Moderator: Neosoft Support

The maximum size of the main window

Postby mishem » Sun Sep 28, 2014 8:35 am

In the project settings, you can specify the minimum size of the main window when you stretch the window with the mouse.
Is it possible to specify the maximum size of the window?

Such adjustment window can be stretched in any way.
Width should not exceed 400 pixels.
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm

Re: The maximum size of the main window

Postby Neosoft Support » Mon Sep 29, 2014 10:19 am

You can add something like this to your publication's Resized action (see Book Properties > Actions):

If "[ClientWidth]" ">" "400"
SetVar "[ClientWidth]" "400"
EndIf
If "[ClientHeight]" ">" "400"
SetVar "[ClientHeight]" "400"
EndIf

This will prevent the pub's width or height from exceeding 400 pixels.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: The maximum size of the main window

Postby mishem » Mon Sep 29, 2014 10:42 am

I tried this option.
He is only triggered when the mouse is released.
The result is not pretty. :(

I was hoping that there are global variables, similar to the way in CustomWindow.
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm

Re: The maximum size of the main window

Postby Neosoft Support » Tue Sep 30, 2014 9:52 am

I'm sorry, that's currently the only way to do it. Another option would be to make the window non-sizeable.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: The maximum size of the main window

Postby Enigman » Thu Oct 09, 2014 12:46 pm

Such adjustment window can be stretched in any way.
Width should not exceed 400 pixels.

I have done this before, but I had to do it by disabling mouse resizing, and then I provided buttons to resize the window explicitly. The button code checks for a direct size or maximum size and resizes the window using code. That way you don't see it try to resize and then retract back to the maximum.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests