splitter控件是自动寻找位置的吧,就是先放置好Panel之类的再放置splitter,它会自动靠到Panel上的。
解决方案 »
- 在ASP.NET中使用CheckBoxList实现字体风格的转换!
- 第三方控件C1FlexGrid的问题!!!
- 怎么样把微软的安装包用在自己的程序上
- DataGridView 的初级问题:)
- C#中如何读取表中数据
- visual sdudio.net创建关于Web应用程序项目的时候就报http://1.1 500 internal server error错误
- VS2005中文版DVD版镜像,请大家一起加快速度啊
- 菜鸟问题c#连接sql数据如何显示
- 如果写上说明?
- 请问我如何灵活控制CrstyReportView的显示方式。
- listbox的事件问题
- 怎样在C#中(VS2003)是选中的文字整体缩进呢?
private void CreateMySplitControls()
{
// Create TreeView, ListView, and Splitter controls.
TreeView treeView1 = new TreeView();
ListView listView1 = new ListView();
Splitter splitter1 = new Splitter(); // Set the TreeView control to dock to the left side of the form.
treeView1.Dock = DockStyle.Left;
// Set the Splitter to dock to the left side of the TreeView control.
splitter1.Dock = DockStyle.Left;
// Set the minimum size the ListView control can be sized to.
splitter1.MinExtra = 100;
// Set the minimum size the TreeView control can be sized to.
splitter1.MinSize = 75;
// Set the ListView control to fill the remaining space on the form.
listView1.Dock = DockStyle.Fill;
// Add a TreeView and a ListView item to identify the controls on the form.
treeView1.Nodes.Add("TreeView Node");
listView1.Items.Add("ListView Item"); // Add the controls in reverse order to the form to ensure proper location.
this.Controls.AddRange(new Control[]{listView1, splitter1, treeView1});
}