Resizable table layout panel in c#(c# 中可调整大小的表格布局面板)
问题描述
我发现 c# (.net 2.0) 中的表格布局面板非常原始.我想让我的用户在表格布局面板中调整列的大小,但没有现成的选项可以这样做.有没有办法至少找出光标是否直接在单元格的任何边界上,如果是,哪个单元格在它下面?可能有这些信息,我们至少可以尝试通过代码调整该行/列的大小.帮我找,
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,
- 光标是否直接位于单元格的任何边框上
- 下面是哪个单元格(仅当第一个问题有答案时才适用)
非常感谢,
苏达桑·斯里尼瓦桑
推荐答案
如果你的布局不是过于复杂,也许你可以使用 SplitContainer 控件?不幸的是,每个 SplitContainer 将只有两个单元格",但您可以在另一个 SplitContiner 面板中嵌入一个 SplitContainer 以获得更多可调整大小的单元格:
If your 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# 中可调整大小的表格布局面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:c# 中可调整大小的表格布局面板


基础教程推荐
- SSE 浮点算术是否可重现? 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- rabbitmq 的 REST API 2022-01-01