Customize the E-Book's Toolbar
Some information in this article describes an unsupported feature in version 4.22 of Activ E-Book Compiler. While you are free to use the information in this article, the unsupported features described may be removed or modified in future versions of Activ E-Book Compiler and/or may not function if used under extreme conditions (example: extremely large or extremely small toolbar buttons).
Introduction
Activ E-Book Compiler includes a number of documented and supported functions for customizing the appearance and content of the toolbar (available by clicking User Interface... on the Edit menu) including: - Whether to have a toolbar at all
- Whether the user can toggle the toolbar on/off
- Which buttons are displayed on the toolbar
- A number of options for modifying the style and content of the toolbar tooltips (such as balloon tips)
- The location of the toolbar (top, bottom, left, right)
Well these are great features, what if you want to change the appearance of the buttons?
Option 1: Customizing Toolbar button designs using Activ Script and HTML
One option is to disable the standard toolbar and use HTML (or even Dynamic HTML) to implement your own toolbar from scratch. If you use Activ E-Book Compiler's Activ Script functions, you can link the buttons to functions such as Search, About, Contents and Exit, etc.
This method has the twin advantage of not relying on undocumented or unsupported features, and of allowing very extensive customization of the appearance. Anything you can do in HTML or DHTML could be part of your toolbar.
But it has a big downside too - it's a lot of work!
Option 2: The Sneaky Method to Customize Toolbar button designs
This is the part which relies on an unsupported feature - but it works great, at least if you don't do anything too crazy. I can't promise it will work if you go to extremes like creating truly massive (or tiny) toolbar buttons.
As it relies on an unsupported function, if want to use this feature, I'd suggest you build your e-book as normal and do this last (after your e-book is complete) - and then test carefully! And, if you are not sure what you're doing, I strongly recommend you do NOT try this.
First, look in the folder where you installed Activ E-Book Compiler, something like C:\Program Files\Activ E-Book Compiler 4.22, and you will find a file called toolbar.tb. - Despite its name, this is actually a Windows BMP file (an image which you can edit using the Windows Paint accessory etc.)
- The image contains a long strip containing the images for the toolbar buttons. When you compile an e-book a compressed version of this file is embedded in the ebook.
- The standard bar is 384X22 pixels, 16 colors. The buttons are each 24X22 pixels, and from left to right are:
- Back
- Forward
- Previous
- Next
- Stop
- Refresh
- Home
- Search
- Contents
- Copy
- Find
- Size
- Print
- Enter Password
- About
- Exit
(16 buttons X 24 pixels = 384 pixels) The secret is, you can modify this file, or replace it with your own version, to replace the toolbar button images with your own designs.
Here is what you do: - Make a safe copy of this toolbar.tb file before you start. If things go wrong, then you can put this file back.
- Make your own version of toolbar.tb and save it to replace the original.
- Stick to 16 color BMP files.
- Your version of the image MUST have the same buttons in the same order (from left to right) as the original.
- You may vary the size of the buttons in your version, but each button in your version MUST be the same size. Example: If you make one button 20 pixels wide, all buttons must be 20 pixels wide.
- If you make the button size bigger or smaller by a small amount, it should be okay. However, if you make the bugs huge or tiny, the results may be unpredictable! If possible, we recommend that you try to stick to the standard size of 24X22 buttons.
- Three colors are treated specially in 4.22.
- 192,192,192 (light gray) = replaced with a transparent color to show the rebar underneath.
- 128,128,128 (dark gray) = replaced with a "shading" color according to Windows settings.
- 233,233,233 (very light gray) = replaced with a "highlighting" color according to Windows settings.
- Compile your e-book. You should see the toolbar in place
- Don't forget to put the oriignal toolbar.tb file back, if you want to go back to the original toolbar buttons, or else all subsequent e-books that you create will have your specially customized toolbar images.
Finally, remember this sneaky method of customizing the toolbar relies on an unsupported feature, but with that proviso, if you like the tip, use if it you want to. Comments or questions - there's a discussion thread for this topic at our www.ebookfriends.com forum.
Also check the Templates/Translations section of this web ste for example toolbars made up by users.
|
|