[英]What is the best way to display and edit a large array of hex data in WinForms?
I am looking to display an array from 128 to 512 bytes in size of hexadecimal data (0x00 to 0xFF) in a 16 X n grid-like display. 我正在寻找在16 X n网格状显示中显示大小为128到512字节的十六进制数据(0x00到0xFF)的数组。 It needs the capability of selecting a single element or group of elements and highlighting the data in some way.
它需要选择单个元素或元素组并以某种方式突出显示数据的能力。 It also needs to allow editing.
它还需要允许编辑。 I'm writing this in C# 3,5 using Winforms.
我正在使用Winforms在C#3,5中编写此代码。
I'm considering some kind of rich text box or just an array of small textboxes, but neither idea is without its drawbacks. 我正在考虑某种形式的富文本框或只是一系列小文本框,但是这两种想法都没有缺点。 Is there a free spreadsheet-like custom control that makes sense, or am I going to have to roll my own.
是否有一个免费的类似电子表格的自定义控件有意义,还是我必须自己动手做。 Any ideas would be appreciated.
任何想法,将不胜感激。
Take a look at the DataGridView. 看一下DataGridView。
You'd need to break this up into the constituent cells, but it definitely is great for putting together a grid of data (like Excel). 您需要将其分解为组成单元格,但这对于将数据网格(例如Excel)放在一起绝对是非常好的。
better approach will be to create a custom control like little label, with all the bells and whistles to show highlighted one and editing and putting all of these in custom container like panel. 更好的方法是创建一个像小标签一样的自定义控件,使所有的钟声和哨子都突出显示,然后将它们全部编辑并放入自定义容器(如面板)中。 you can specify row and column for your custom label for easier layout.
您可以为自定义标签指定行和列,以简化布局。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.