关于Tab控件的问题
我正在创建一个使用选项卡式视图的应用程序。我从 SQL 数据库中提取数据并将其显示在网格中。我希望能够允许用户在每个选项卡上添加、编辑、删除等。有没有办法让每个选项卡上显示添加、编辑和删除按钮,而不必单独将其编码到每个选项卡中?如果需要更多信息,请告诉我。谢谢
I am creating an app that that uses a tabbed view. I pull data from a sql database and display it in a grid. i want to be able to allow the users to add, edit, delete, etc on each tab. Is there a way to have add, edit, and delete buttons that show up on each tab without having to code it into each tab individually? Let me know if more info is needed. thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将这些按钮移到选项卡之外。
或者
您可以编写一个包含这些添加、删除、编辑等按钮的控件,然后您可以在每个选项卡中使用该控件。
You can move these buttons outside tab.
or
You can write a control that will contain these add, delete, edit etc buttons and then you can use this control in each tab.
您可以将按钮放在选项卡控件外部并将它们应用到当前选定的选项卡,或者让每个选项卡显示从包含按钮的基类派生的控件(因此它们仅在基类中实现一次)。
You could either put the buttons outside the tab control and apply them to the currently selected tab, or have each tab display a control derived from a base class that includes the buttons (so they are only implemented once in the base class).