禁用 Ext Gwt“formdata”边界
我有一个要添加到 FormPanel 中的表单数据。我使用表单数据向表单面板添加一些文本字段。然后我将按钮添加到表单面板。我只想要 Formpanel 周围的边框,即文本字段和按钮周围的边框。但目前我在表单数据周围有一个边框,在表单面板周围有另一个边框,将文本字段和按钮分开。 代码是
private FormPanel editFormPanel = new FormPanel();
FormData formData = new FormData("-10");
formData.setMargins((new Margins(5)));
event.setFieldLabel(EventDescription());
event.setAllowBlank(false);
event.setId(FORM_EVENT);
knownIssues.setFieldLabel(KnownIssues());
knownIssues.setAllowBlank(false);
knownIssues.setId(FORM_KNOWN_ISSUES);
editFormPanel.setButtonAlign(HorizontalAlignment.CENTER);
editFormPanel.add(event, formData);
editFormPanel.add(knownIssues, formData);
editFormPanel.addButton(btnAddLocation);
有没有办法可以删除/禁用表单数据周围的边框?
谢谢
I have a formdata that I'm adding to a FormPanel. I'm adding few text fields to the formpanel with formdata. And then I'm adding the buttons to the Form panel. I only want the border around the Formpanel ie around text fields and buttons together. But currently I'm having a border around the formdata and another around the formpanel, separating the text fields and the buttons.
Code is
private FormPanel editFormPanel = new FormPanel();
FormData formData = new FormData("-10");
formData.setMargins((new Margins(5)));
event.setFieldLabel(EventDescription());
event.setAllowBlank(false);
event.setId(FORM_EVENT);
knownIssues.setFieldLabel(KnownIssues());
knownIssues.setAllowBlank(false);
knownIssues.setId(FORM_KNOWN_ISSUES);
editFormPanel.setButtonAlign(HorizontalAlignment.CENTER);
editFormPanel.add(event, formData);
editFormPanel.add(knownIssues, formData);
editFormPanel.addButton(btnAddLocation);
Is there a way that I can remove/disable the borders around the formdata?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,我发现您的代码中有一个拼写错误:
它是另一个表单面板吗?
FormData 不渲染边框。请参阅 sencha.com 中的 GXT 示例。这是链接
First of all, I find a typo in your code:
Is it another form panel?
FormData does not render border. Refer GXT examples in sencha.com. Here is the link
找到解决方案,需要将 FormPanel 的 setBodyBorder 属性设置为 false 即可解决问题。
谢谢
Found the solution, need the setBodyBorder property of the FormPanel to false and that will solve the issue.
Thanks