[IronPython] weirdness with DataGridViewButtonColumn

jeff sacksteder jsacksteder at gmail.com
Thu Aug 3 05:16:03 CEST 2006


Could someone please try the following code? By every piece of documentation
I can find, this SHOULD create two button columns with the text provided
displayed on them. All I am getting is blank buttons and I'm beginning to
suspect that there is something wrong with my workstation.


import clr
clr.AddReference('System.Windows.Forms')
import System.Windows.Forms as SWF

f = SWF.Form()
dgv = SWF.DataGridView()

f.Controls.Add(dgv)
myCol = SWF.DataGridViewButtonColumn(Text="Spaminate",UseColumnTextForButtonValue
= True)
dgv.Columns.Add(myCol)
myCol = SWF.DataGridViewButtonColumn(Text="Spaminate2",UseColumnTextForButtonValue
= True)
dgv.Columns.Add(myCol)

SWF.Application.Run(f)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060802/1c7403df/attachment.html>


More information about the Ironpython-users mailing list