Is there a chance to imprive Python for .net to let "System.Windows.Forms.Form().Controls" be indexable?
1 Sep
2011
1 Sep
'11
7:30 a.m.
Hi, here is the code: import clr clr.AddReference("System.Windows.Forms") from System.Windows.Forms import Form,Application,Button form=Form() form.Controls.Add(Button()) print form.Controls[0] #this code didnt work with an error say "not indexable object" but this worked in ironpython,it seems in ironpython it treats the "form.Controls" as an list like object I can only get the form.Controls value use the "form.Controls.get_Item(0)" in the python for .net So is there a chance to imprive Python for .net to have that characteristic? thanks
4611
Age (days ago)
4613
Last active (days ago)
3 comments
2 participants
participants (2)
-
Barton
-
刘振海