Kai*_*Kai 3 .net c# winforms .net-4.5
我已经向DataGridView添加了一个按钮列,并希望在其上显示"比较"文本.我已将Text属性设置为Compare和UseColumnTextForButtonValueTrue,但不显示任何文本:

这在运行时也是如此,因此它不仅不在设计器中显示:

如何显示文本?
编辑:为了繁荣,这里是生成的Designer.cs文件中的代码.我自己还没有在这个表单中添加任何代码,所以没有什么东西可以让它重新进一步重新排列.
//
// Compare
//
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Compare.DefaultCellStyle = dataGridViewCellStyle1;
this.Compare.HeaderText = "Compare";
this.Compare.Name = "Compare";
this.Compare.Text = "Compare";
this.Compare.ToolTipText = "Compare the dictionary definition to the system definition";
this.Compare.UseColumnTextForButtonValue = true;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6423 次 |
| 最近记录: |