简体   繁体   English

C++/Tk 是否与 Tk 8.5 兼容?

[英]Is C++/Tk compatible with Tk 8.5?

Since Tk 8.5, Tk started using Native Based UI components - buttons, scrollbars etc. I wonder if C++/Tk supports such Native GUIs approach?从 Tk 8.5 开始,Tk 开始使用基于本机的 UI 组件 - 按钮、滚动条等。我想知道 C++/Tk 是否支持这种本机 GUI 方法?

As far as I can see, C++/Tk is based on Tk 8.4 (if it's before that then it really needs updating).据我所知,C++/Tk 基于 Tk 8.4(如果它在此之前,那么它确实需要更新)。 It wouldn't in principle be that hard to adapt to 8.5, where the Ttk widgets are supported;原则上适应支持 Ttk 小部件的 8.5 并不难; 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;如果它完全明智地完成[*],那么至少一些小部件会花费你几个小时,因为 Ttk 小部件已经遵循与现有小部件相同的模式; 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.非小部件位可能需要更长的时间,就像全新的小部件类型(笔记本、树视图)一样,尽管它们遵循正常的 Tk 模式,但它们仍然具有许多新方法。

[* I've not read the source code to C++/Tk, so I can't say for sure how easy it is. [* 我没有读过 C++/Tk 的源代码,所以我不能确定它有多容易。 ] ]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM