Walter Meester
HoogkarspelNetherlands
General information
Category:
Forms & Form designer
You could try the following solution:
Make a class of your toolbar and make a instance of it at the start of your application:
m.pToolbar=CREATEOBJECT("Toolbarclass")
Let a timer refresh the toolbar at regular intervals:
m.pToolbar.refresh in the timer event of the timer
Let each object on the toolbar (buttons, comboboxes, chackboxes etc.) decide if it should be enabled of disabled by adding simlular code in the refresh methods of the objects:
THIS.Enabled=TYPE("_Screen.Activeform")="O" AND ;
PEMSTATUS(_Screen.Activeform,"Print",5)
In the click event you could add the following code
IF TYPE("_Screen.Activeform")="O"
_Screen.Activeform.print
ENDIF
In this way you are really making your application OO. Your forms don't have to have knowledge about the existance of a toolbar. It only has to expose some methods or properties which could be use either by a toolbar or a menubar.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only