Source language: Translate to:

Book properties - section "Main menu"

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Book properties - section "Main menu"

Postby Skarabäus » Tue Jul 18, 2006 2:01 am

Hello,

following problem i have:

My publication has a wellcome page.
On this page a person shall click a button.
If the person clicks the button, the publication jumps to another page
and a main menu will be showned, that i created.

Under book properties/section main menu

i can find the check box "attach the menu below to this publication"

At now, i have only this possibility using this check box
But showing the main menu on the wellcome page looks not really nice.

My question is as follow:

Is there an action command like showObject/hideObject for the main menu itself.
If not, how can i solve this in an other way.

Many thanks for you help in advance.
Skarabäus
User avatar
Skarabäus
 
Posts: 37
Joined: Mon May 15, 2006 4:31 am
Location: Germany, Ostfildern

Postby Gaev » Tue Jul 18, 2006 5:43 am

Skarabäus:

How about using a CustomWindow instead of the Welcome page ; a CustomWindow that is bigger than the Client Area (inside) of your application window ... so it covers the menu bar.

Place your button on this CustomWindow ... and when clicked, close this CustomWindow ... so the real first page (with the menu bar) is revealed.
User avatar
Gaev
 
Posts: 3734
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Skarabäus » Tue Jul 18, 2006 7:02 am

Hi Gaev,

many thanx for your prompt proposal.
i tried to do it as you told.
i created a container, put all the objects in,
resized the container object over the title and main menu bars, etc.
after this i put following action command into the subroutine register tab:

CustomWindow "Kraichgau-Stromberg" "0" "-41" "Container13" "FixedPos"

additionally i filled up the the background of the container in e.g. black color.

Result:

Neobook seems to ignore the part of the created custom window who covers title and main menu bar. therefore it adopts the custom window with the container so that title and menu bar is visible again.

did i make any mistakes ? :oops:
Skarabäus
User avatar
Skarabäus
 
Posts: 37
Joined: Mon May 15, 2006 4:31 am
Location: Germany, Ostfildern

Postby Gaev » Tue Jul 18, 2006 7:25 am

Skarabaus:

Try ...
Code: Select all
CustomWindow "Kraichgau-Stromberg" "0" "-41" "Container13" "NoBorder+Exclusive"
... but make sure you have the button on the Container to CloseCustomWindow or Exit ... otherwise, you will have to use CtrlAltDelete to get out !!
User avatar
Gaev
 
Posts: 3734
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Skarabäus » Tue Jul 18, 2006 7:57 am

hi gaev,

i tried the code,
put the button in the container with the action command "closecustomwindow",
made the visible control in the "preview screen location" of the customwindow-properties where title and main menu bar are covered by the custom window. but unfortunately it's the same result like before.

additionally i switched off everything of the window style where it can be found under book properties/window/window style but it seems the main menu bar is a a tough nut to crack :wink:
Skarabäus
User avatar
Skarabäus
 
Posts: 37
Joined: Mon May 15, 2006 4:31 am
Location: Germany, Ostfildern

Postby Gaev » Tue Jul 18, 2006 10:42 am

Skarabaus:
... made the visible control in the "preview screen location" of the customwindow-properties where title and main menu bar are covered by the custom window. but unfortunately it's the same result like before.
... works for me here ... although you may have to adjust the top-position (from -41 to about -23 on my machine) ... perhaps you can upload a sample pub (with just this Container object and its Button) to the NeoBook File Archives (link is in the second image at top left corner of this page) ... so others can look at what is different in your pub.
User avatar
Gaev
 
Posts: 3734
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Neosoft Support » Tue Jul 18, 2006 4:13 pm

I discovered this by accident. When defining your menu, uncheck the "Initial State > Visible" check box for each of your main headings. You won't notice any difference in design mode, but when you run your publication, the menu bar will be hidden. Then after displaying your preview page, you can restore the menu bar by showing all of the menu headings like this:

ShowMenuItem "MenuHeading1"
ShowMenuItem "MenuHeading2"
ShowMenuItem "MenuHeading3"
...
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Skarabäus » Wed Jul 19, 2006 3:47 am

hi gaev,
hi neosoft support,

after some tests and considerations i have cracked the though nut.

gaev gave me following action command:

CustomWindow "Name of the window" "0" "-20" "Container13" "NoBorder+Exclusive"

the problem was:

i put the code in the register tab "subroutines" where the code works but didn't covers the main menu bar.

hours later i put the code, just for fun, in the register tab "Startup" :!:
where the main menu bar suddenly is covered by the custom window during the running process of the publication.

Result:
using the action command "customwindow" for covering a created main menu must be placed in the register tab "Startup" and nowhere else. :idea:

gaev, thanks for the good tip!

more though nuts to this topic are coming soon. :wink:
Skarabäus
User avatar
Skarabäus
 
Posts: 37
Joined: Mon May 15, 2006 4:31 am
Location: Germany, Ostfildern


Return to NeoBook Action Commands

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest