If you want to create a function for several controls (in my case Grid and List View) is there a way to distinguish the control using some property similar to the ObjectName for CAD objects?
Example:
(defun Dialog_Control_ColumnFit (control / objectName)
(cond
((= (dcl-Control-GetObjectName control) "Grid")
...
)
((= (dcl-Control-GetObjectName control) "ListView")
...
)
)
...
)
There is no direct way unfortunately. To just distinguish between several possible control types, one workaround is to check for the existence of a control-specific property in the list returned by (dcl-Control-GetProperties (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/Control/GetProperties.htm)).
In that case I will add an argument to the function to indicate the control type. Thank you Owen.