Winforms 文本换行不适用于Telerik RadButtonneElement
我在Telerik RadListView中动态添加了一个按钮。但是按钮并没有包装文本 这是我的密码:Winforms 文本换行不适用于Telerik RadButtonneElement,winforms,telerik,Winforms,Telerik,我在Telerik RadListView中动态添加了一个按钮。但是按钮并没有包装文本 这是我的密码: this.radBtnProduct = new RadButtonElement(); this.radBtnProduct.TextElement.Size = new Size(100,60); // .TextWrap = true; this.radBtnProduct.Location = new Point(0, 0); this.radBtnProduct.MinSi
this.radBtnProduct = new RadButtonElement();
this.radBtnProduct.TextElement.Size = new Size(100,60); // .TextWrap = true;
this.radBtnProduct.Location = new Point(0, 0);
this.radBtnProduct.MinSize = new Size(100, 60);
this.radBtnProduct.MinSize = new Size(100, 60);
// wrapping
this.radBtnProduct.TextWrap = true;
谢谢你的帮助
编辑:
我用了这个密码
this.radBtnProduct.Text = this.dataItem.Text.Replace(" ", "\n");
但我不确定它是否存在一些问题,默认情况下RadButtonneElement的自动大小设置已打开。你需要关掉它,以使你的尺寸工作。试试这个:
this.radBtnProduct = new RadButtonElement();
this.radBtnProduct.AutoSize = false;
this.radBtnProduct.Size = new Size(100, 60); // .TextWrap = true;
this.radBtnProduct.TextWrap = true;