DevExpress控件之LayoutControl

一、项目运行中不显示右键菜单

layoutControl1.AllowCustomization = false

 

二、控件超出容器后不显示滚动条

layoutControl1.AtuoScroll = false

 

三、在layoutControlItem前面显示图片

 

1. layoutControlItem1.TextVisible = true

2. layoutControlItem1.Text = " "

3. 设置layoutControlItem1下ImageOptions.Alignment=MiddleCenter,并选择ImageIndex或选择其它图片

 

 

四、动态创建Devpress LayoutControl控件的使用例子。通过代码动态添加 LayoutControlItem ,TabbedControlGroup ,LayoutControlGroup 及具体控件并排版的例子。

LayoutControlItem lci = layoutControlGroup1.AddItem();

//lci.Size = new System.Drawing.Size(800, 20); //控件大小
//lci.Move(layoutControlGroup1.Items[layoutControlGroup1.Items.Count - 1], InsertType.Bottom);       //控件位置 好像没起作用

SimpleButton sb = new SimpleButton();
lci.Control = sb;
layoutControlGroup1.Add(lci);
lci.TextVisible = false;

参考:Devepress LayoutControl的使用

Devexpress中LayoutControl控件动态生成控件

DevExpress.XtraLayout.LayoutControl 动态添加控件

 

posted @ 2019-03-18 14:40  quanzhan  阅读(2952)  评论(0编辑  收藏  举报