用户定义的 TabPage 加载到 TabControl 中
我目前正在为自己的利益编写一个小型名片应用程序,但遇到了一个小问题。
我有一个我编写的用户定义的 TabPage dll。用户在空白 UD-TabPage 上输入有关人员的信息。然后,我从 tabPage 中删除信息并将其存储在我创建的 Record
对象中。
用户可以选择创建许多这样的选项卡页面。每次我将信息存储在 Record 对象中并将该对象放置在 List
中。
当用户输入完联系人并想要浏览所有选项卡时,我将 26 个选项卡页面放置在 TabControl AZ 上。他们将滚动到他们想要的选项卡页面,以便他们可以查看他们的联系人。
我遇到的问题是,我不确定如何从 List
中获取数据并将其放回到 tabControl 上,而无需创建额外的选项卡。例如。如果我有一个名为“John Smith”和“Suzan Smith”的人,我希望能够滚动到 S 选项卡,并且 John 的将首先出现,当我点击下一步时,Suzan 的将显示。
我已经按字母顺序排列了用户创建的选项卡。我只是不确定如何整齐地展示它们。
如果有人有一些想法或一些伪代码,那就太好了!谢谢!
I am currently writing a small rolodex application for my own benefit and have come across a little problem.
I have a user defined TabPage dll that I wrote. The user enters information about a person on a blank UD-TabPage. Then I strip the information from the tabPage and store it in a Record
Object that I created.
The user has the option to create many of these tabPages. And each time I store the info in a Record object and place that object in a List<Record>
.
When the user is done entering contacts and wants to browse all of the tabs, I then place 26 tabPages on the TabControl, A-Z. And they will scroll to the tabPage that they want, so they can view their contact.
The problem I am running into is that I am unsure of how to take my data from the List<record>
and put it back on the tabControl without having to create extra tabs. For example. If I have a person named "John Smith" and "Suzan Smith", I want to be able to scroll to the S tab and John's would be there first, and Suzan's would display when I hit next.
I have already alphabetized the tabs the user created. I am just unsure how to neatly display them.
If anybody has some ideas or some psuedocode that would be great! Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会使用字典)。例如:
然后您可以循环遍历cGroupedRecords中的每个组。
I would use a Dictionary). For example:
Then you can cycle through each group in cGroupedRecords.