![]() |
![]() |
|
![]() |
Subject: FAQ:PdoxWin:ToolBar Library:2002.03.26 Version 1.0 (2002.03.26) Written by Mike Irwin edited by Mike Irwin ==================== 0. Introduction ==================== This FAQ addresses the handling of Toolbars with Paradox. ------------------------------- 0.1 Legal Info and Disclaimers ------------------------------- Paradox is a trademark of Corel. Borland Database Engine (BDE) is a trademark of Inprise. The information provided in this FAQ is provided "as is" and is not warranted in any way. The information provided in this FAQ is not endorsed or authorized by Corel or Inprise in any shape, form, or manner. The editors claim NO responsibility for ANY illegal activity regarding this file, or as a result of someone reading this file. You may distribute this file, as long as the copies are complete, unaltered, and are in electronic form only. ------------- 0.2 Feedback ------------- Please send feedback in a Corel Paradox newsgroup or the news:comp.databases.Paradox newsgroup to any of the FAQ Team mentioned in the "FAQ: FAQ FAQ" document. Please preface the subject of your post with the string "PDXWIN FAQ" to alert Team members to the function of the message. Please specify the FAQ name and section number the comment applies to, if any. ------------- 0.3 Attachments ------------- There is one attachment - ToolbarLib.exe. This is a self-extracting Zip file that will default to extraction into c:\Temp. It contains the following items: ToolbarLib.lsl ToolbarButtons.db, Fam, Tv, PX, Mb Toolbars.db, Px PrintPreview.bmp The tables contain a selection of toolbars and buttons. ============================== 1. Toolbars ============================== Toolbars have proved problematical at times with Paradox because they are fairly persistent objects. They persist when they're not visible, which is annoying. They even persist from run to run of Paradox, which is really annoying ! Therefore, I came to the conclusion that killing the toolbar before using it was the only "safe" way to do things. ============================== 2. Setting up Toolbars ============================== In the attachment you will find two tables. ToolbarButtons holds a list of the buttons you'll be wanting to use Toolbars holds the definition of each toolbar. ---------------- 2.1 Toolbars.db ---------------- This table just defines the list of buttons for each toolbar. You can define multiple toolbars in this file. ToolbarName - Just a name. Also the title when it is undocked. ToolbarCluster - Needed for toggle-grouping, etc. ButtonRef - Reference number into ToolbarButtons ButtonName - Name for humans to understand You work with Toolbars. The library converts these into lists of buttons as needed. ---------------- 2.2 ToolbarButtons.db ---------------- This table defines each button. A button can be defined multile times if you want. ButtonRef - Reference used in Toolbars ButtonName - Name (for humans !) ButtonType - Type - see Help definitions ButtonCommandID - event triggered by use of button. See Help definitions ButtonGraphicID - ID of graphic to be used on face of button. See Help definitions. If set to zero, then the graphic in the next field is used instead. ButtonGraphic - Graphic field holding button graphics ButtonText - Text to appear in toolbar ButtonToolTip - Text for hint or tooltip ---------------- 2.3 Location ---------------- As delivered, the library expects to be in a subdirectory :SystOpal: and the tables in :SystData:. Extra graphics in :Docs:. Obviously you can change these as you wish. ============================== 3. Use ============================== Before starting, make sure that you don't have any test toolbars with these names lying around ! On opening, the library clears all native toolbars and also cleans up its own set. There are just four methods. You refer to all toolbars by name (the content of the first field in Toolbars.db), not a handle. Create - make a toolbar Show - make it visible Hide - make it invisible Destroy - eliminate the toolbar Whenever a form gains focus it should create and show its toolbars, and whenever it loses focus it should hide and destroy them. In principle this shouldn't be necessary, but it appears that omitting this step will result in some or all of the buttons - especially the navigation ones - becoming disabled ! Just using Hide and Show doesn't help ! As an example, when showing a report on-screen: toolbarlib.emHideToolbar("Fred") toolbarlib.emDestroyToolbar("Fred") reReport.open(":Rpts:Name") if reReport.wait() then reReport.close() endif toolbarlib.emCreateToolbar("Fred") toolbarlib.emShowToolbar("Fred") Obviously, when opening a form or regaining focus you should do this toolbarlib.emCreateToolbar("Fred") toolbarlib.emShowToolbar("Fred") and this when losing focus or closing: toolbarlib.emHideToolbar("Fred") toolbarlib.emDestroyToolbar("Fred")toolbarlib.exe Paradox Community Newsgroups |
![]() Feedback | Paradox Day | Who Uses Paradox | I Use Paradox | Downloads ![]() |
|
![]() The information provided on this Web site is not in any way sponsored or endorsed by Corel Corporation. Paradox is a registered trademark of Corel Corporation. ![]() |
|
![]() Modified: 15 May 2003 Terms of Use / Legal Disclaimer ![]() |
![]() Copyright © 2001- 2003 Paradox Community. All rights reserved. Company and product names are trademarks or registered trademarks of their respective companies. Authors hold the copyrights to their own works. Please contact the author of any article for details. ![]() |
![]() |
|