VDF-GUIdance logo

  Visual DataFlex Logo

Shared knowledge leads to accumulated knowledge

        Printer Friendly Page

Size: 29 KB Download
Date Created: 09/11/1999
Date Updated: 06/18/2006
Author: Vincent Oorsprong
Company: Data Access Europe B.V.
This package contains an active toolbar that will disable buttons if they cannot be used. This is could happen if the focus-object is not data-aware or if a modalpanel. Please have a look at the readme if you get the error 'DftimerManager doesn't have window_handle!'.
This code is compatible with VDF6-VDF11.1 There are different versions available for the different development platform. The included readme document has the details about that.

Active toolbar

By Vincent Oorsprong
This package contains an adapted toolbar object that will shadow toolbarbuttons if the focus-object does not understand the messages sent by the toolbar. This will be the case if the focus-object is not data-aware (e.g. form, grid) and if the objects are located in a modal panel (selectionlist).
Here's a screenshot of the order entry example program with the active toolbar in action.
Following are the steps needed to include this package into the order entry example
- Copy the file ActiveToolbar.pkg into the order\appsrc folder
- Open the IDE in the order entry sample workspace
- Select 'Register external component' from the 'Components'-menu
- In the dropdown box select a tool-bar object
- Now click on the prompt button of item package name and select the file Activetoolbar.pkg. This will throw up a errorbox that complains about an incompatible fileformat that you will not be able to visually edit this package in the IDE. This is perfectly allright, so hit the Ok button on this errorbox.
- Enter 'Active toolbar' in the description field and press the <Enter> key. The external component registratioin is complete and now you are ready to include it into the application.
- Open the program 'order entry sample appplication'.
- In the treeview on the lefthand side click on 'Standard toolbar (DfStdBtn.pkg)' and after that select the button 'Change toolbar'. This will popup a screen listing the 'Active toolbar' we have created. So select it.
- Include the line 'Use Dftimer.pkg' in the top of your program so it looks like this:
Object ProgramWorkspace is a Workspace
Set WorkspaceName to CURRENT$WORKSPACE
Set ModuleName to 'Order'
Set HelpName to 'OrdEntry.hlp'

Use Help_Ids.inc Developer should provide this file of help context links.
Use Std_Help.pkg
Use Dftimer.pkg
This step is necessary because otherwise your program will generate an error "DfTimerManager doesn't have window handle!" if you close it.

- Compile the program and run it to see the results.

If you want to use this package in VDF7 or VDF8, you will need to use the package ActiveToolbar7.pkg instead of ActiveToolbar.pkg.
You can also use the package from within VDF9.x - and higher - but then you should use the included ActiveToolbar9.pkg

The code changes needed for the VDF9 version have been donated by Peter van Mil
Bob Worsley added code to disable the "active state" for the save/delete button


ActiveToolbar Jun 18, 2006 ~29 Kb zipfile

ActiveToolbar Apr 20, 2004 ~29 Kb zipfile