使笔记本选项卡锚定,使其位置无法更改
我有一个 GtkNotebook,它至少包含一个永久选项卡,称为“搜索”。此页面中的小部件允许创建更多页面,并且这些页面有一个包含关闭按钮的选项卡。
如何使选项卡可重新排序,同时将“搜索”选项卡固定在位置 0? gtk.Notebook.set_tab_reorderable() 的当前行为是,它允许您物理拖动选项卡以对其进行重新排序...当可重新排序的选项卡移过它时,它不会阻止该选项卡被迫重新排序。
示例:
第一个图像是默认位置:
该图像是拖动 Row#6( 其中第 6 行可重新排序,但搜索不可重新排序):
如何防止“搜索”被“可重新排序”选项卡重新排序?
I have a GtkNotebook that will contain at the very least, one permanent tab, called "Search". The widget within this page allows for more pages to be created, and these pages have a tab that contains a close button.
How do I make the tabs reorderable, but also keep the "Search" tab anchored at position 0? The current behavior of gtk.Notebook.set_tab_reorderable() is that it allows you to physically drag a tab to reorder it...it doesn't stop that tab from being forced to reorder itself when a reorderable tab moves past it.
Example:
This first image is the default positions:
This image is the result of dragging Row#6( where Row#6 is reorderable but Search isn't):
How do I keep "Search" from being reordered by 'reorderable' tabs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,一个可能的解决方案是连接到
'page-reordered'
信号,如下所示:希望它有帮助。
Seems to me like a possible solution would be to connect to the
'page-reordered'
signal like this:Hope it helps.