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# 中可调整大小的表格布局面板
基础教程推荐
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- WPF 模态进度窗口 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
