C++/Tk 与 Tk 8.5 兼容吗?
从 Tk 8.5 开始,Tk 开始使用基于 Native 的 UI 组件 - 按钮、滚动条等。我想知道 C++/Tk 是否支持这种 Native GUI 方法?
Since Tk 8.5, Tk started using Native Based UI components - buttons, scrollbars etc. I wonder if C++/Tk supports such Native GUIs approach?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,C++/Tk 基于 Tk 8.4(如果是在此之前,那么它确实需要更新)。原则上适应8.5并不难,因为8.5支持Ttk小部件;只需添加更多小部件定义(以及一些其他命令,这样您就可以执行诸如更改主题之类的操作)。如果它完全明智地完成[*],那么至少某些小部件将花费您几个小时,因为 Ttk 小部件已经遵循与现有小部件相同的模式;非小部件位可能需要更长的时间,就像全新的小部件类型(笔记本、树视图)一样,尽管它们遵循正常的 Tk 模式,但它们仍然有许多新方法。
[* 我还没有读过 C++/Tk 的源代码,所以我不能确定它有多容易。 ]
As far as I can see, C++/Tk is based on Tk 8.4 (if it's before that then it really needs updating). It wouldn't in principle be that hard to adapt to 8.5, where the Ttk widgets are supported; just a matter of adding more widget definitions (and a few other commands too, so you can do things like change the theme). If it's done at all sensibly[*], that'd take you all of a few hours for at least some of the widgets as the Ttk widgets already follow the same sorts of patterns as existing widgets; the non-widget bits might take longer, as might the wholly new widget types (notebook, treeview) as, although they follow normal Tk patterns, they still have a number of new methods.
[* I've not read the source code to C++/Tk, so I can't say for sure how easy it is. ]