在C#中可调整大小的表格布局面板 [英] Resizable table layout panel in c#

查看:314
本文介绍了在C#中可调整大小的表格布局面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现在C#中的表布局面板(.NET 2.0)是非常原始。我希望让我的用户改变了表布局面板列,但没有现成的选择这样做。有ATLEAST一方法找出光标是否是直接通过一个细胞的任何边界,如果是这样,这是细胞它下面?可以是具有这些信息,我们可以尝试ATLEAST调整直通的代码,行/列。帮我找,

I find the table layout panel in c# (.net 2.0) to be very primitive. I wanted to allow my users to resize the columns in a table layout panel but there are no ready made options to do so. Is there a way atleast to find out whether the cursor is directly over any borders of a cell and if so, which cell is beneath it ?? May be having this information, we can atleast try resizing that row/column thru' code. Help me finding,


  • 光标是否直接在单元格中的任何边界

  • 哪个单元是它下面(仅适用,如果第一个问题的答案)

非常感谢,

Sudarsan斯里尼瓦桑

Sudarsan Srinivasan

推荐答案

如果你的布局并不复杂,也许你可以通过实现你想要的< A HREF =http://msdn.microsoft.com/en-us/library/system.windows.forms.splitcontainer.aspx相对=nofollow> SplitContainer的控制?不幸的是,每一个SplitContainer的将只有两个细胞,但你可以嵌入在另一个SplitContiner面板SplitContainer中获得更多的可调整大小的单元格:

If you layout is not overly complex, maybe you can achieve what you want by using SplitContainer controls? Unfortunately, each SplitContainer will have only two "cells", but you can embed a SplitContainer in another SplitContiner panel to get more resizable cells:

┌──────────────────┐
│┌─────┬──────────┐│
││     │          ││
││     │          ││
│└─────┴──────────┘│
├──────────────────┤
│┌──────────┬─────┐│
││          │     ││
││          │     ││
│└──────────┴─────┘│
└──────────────────┘

确定,所以ASCII艺术从来不是我的更强大的技能之一,但我觉得你得到的点; O)

OK, so ASCII art was never one of my stronger skills, but I think you get the point ;o)

这篇关于在C#中可调整大小的表格布局面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆