温馨提示×

在C#中如何禁用Splitter的拖拽功能

c#
小樊
138
2024-08-21 10:30:28
栏目: 编程语言
开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

要禁用Splitter的拖拽功能,可以通过设置SplitterPanel对象的Enabled属性为false来实现。以下是一个示例代码:

splitContainer1.Panel1.Enabled = false;
splitContainer1.Panel2.Enabled = false;

在这个示例中,splitContainer1是一个SplitContainer控件,splitContainer1.Panel1和splitContainer1.Panel2分别是SplitContainer的两个面板。通过将这两个面板的Enabled属性设置为false,就可以禁用Splitter的拖拽功能。

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:ListView在C#中如何实现拖拽功能

0