The ObjXplorer is a handy VFP developer class. Simply drop this class on any form to enable the following functionality:
ListAll method for listing all objects on the form or any particular container passed to it. The list shows non-default properties and methods and is automatically written to a text file (see below for an example). Here is how this is done in the sample app:

ListColletction method for a listing of objects with a given property value. See below for an example.
ExecAll function to execute a group of methods that meets a certain condition. The sample app has an example that executes 'Zorder' method for labels that have 'CanShow' in their tag.
Note: You can use the ExecAll method to refresh all controls in a pageframe instead of only frame's visible page. The sample app shows this example:

ThisForm.objxplorer.ExecAll(thisform, "Enabled", "%_%getvalue%_% = .F.","Refresh()")
Here is an example of the text the "List all" button shows in the sample app (note that this button is disabled in the .exe version of the sample app since at runtime the events and methods code is not accessible)
* Object : form1.command5 ( d:\foxyclasses\samples\objxplorer\objxplorer.scx )

* Properties :

* CAPTION Zorder all Labels


* LEFT 478

* NAME Command5

* TOOLTIPTEXT Executes 'Zorder' for all labels

* TOP 32

* WIDTH 120

* Events and methods :


*ThisForm.objxplorer.ExecAll(thisform, "BaseClass", "upper(%_%getvalue%_%) = 'LABEL'","Zorder("+str(int(val(this.Tag)%2))+")")
this.Tag = str(val(this.Tag)+1)
The following is an example of what the "List Properties" button shows in the sample application. Here is the code that triggers this; ThisForm.objxplorer.ListCollection('enabled',thisform)
SCX file : d:\foxyclasses\samples\objxplorer\objxplorer.scx

Hierarchy : form1.cmdlistall

enabled : .T.

Hierarchy : form1.command2

enabled : .T.

Hierarchy : form1.command3

enabled : .T.

Hierarchy : form1.command4

enabled : .T.
As a tribute to VFP, you can now download the full Foxy Classes libraries free of charge and experiment on your own.
Send mail to webmaster@engineerica.com with questions or comments about this web site.
Copyright 2002-2003 Engineerica Systems, Inc.