的WinForms:替代的SplitContainer?WinForms、SplitContainer

2023-09-03 05:09:49 作者:風輕雲淡

是否有任何替代控制人可以建议更换的WinForms SplitContainer的?我不喜欢的SplitContainer如何显示,怪异,点缀当其选择,并带其时正被拖动。我想有面板重新大小用户拖动代替鼠标和没有显示出任何点带时,分离器被拖动。基本上,怎么样板全部重新调整大小在Windows资源管理器在Vista上完成的。

Are there any alternative controls someone can suggest to replace the WinForms SplitContainer? I don't like how the SplitContainer shows that weird, dotted strip when its selected and when its being dragged. I want to have the panels re-size as the user drags instead of on mouse up and not show any dotted strips when the splitter is being dragged. Basically like how all the re-sizing of panels is done in windows explorer on vista.

这是带点东西我说的:

推荐答案

自己写的拆分容器用户控件。你基本上刚落,两个专员小组到控制(左侧和右侧面板),然后让他们之间的空间是分离器。在用户控件稍微的MouseDown,的MouseMove和MouseUp逻辑本身就会让你很容易将分流左,右,两个小组将妥善阻止这种无处不在,但在分离器,所以你的逻辑检查,如果鼠标,如果在分路器很简单,只要可以。

Write your own split container UserControl. You basically just drop two Panels onto the control (for the left and right panels) and then let the space between them be the splitter. A little MouseDown, MouseMove and MouseUp logic on the UserControl itself will let you easily move the "splitter" left and right, and the two panels will properly block this everywhere but over the splitter, so your logic for checking if the mouse if over the splitter is as simple as can be.

这可能是一些额外的工作得到控制行动,你希望它在设计模式中的行为方式。

It may be a little extra work getting the control to act the way you want it to act in design mode.

 
精彩推荐
图片推荐