View Full Version : ClassOf dotNetControl
labbejason 06-25-2008, 12:55 AM Is there a way to find out if a rollout control is infact "System.Windows.Forms.Button" ? It would be similar to trying to figure out if an object is sphere:
if (classOf obj) == sphere do print "Is a sphere"
|
|
magicm
06-25-2008, 02:08 AM
Sure:
TestCtrl = dotNetObject "System.Windows.Forms.Button"
dotNetObject:System.Windows.Forms.Button
CtrlType = dotNet.getType TestCtrl
dotNetObject:System.RuntimeType[System.Windows.Forms.Button]
CtrlType.Name
"Button"
CtrlType.Namespace
"System.Windows.Forms"
CtrlType.IsInstanceOfType TestCtrl
true
show CtrlType shows all available properties.
Cheers,
Martijn
labbejason
06-25-2008, 03:29 AM
Thanks, Martijn, appreciate it.
CGTalk Moderation
06-25-2008, 03:29 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.