隐藏“显示更多字体” wxFontDialog、wxpython 中的按钮

发布于 01-03 06:08 字数 100 浏览 4 评论 0原文

当我们使用wx.FontDialog时,如何去掉“显示更多字体”按钮?

dlg = wx.FontDialog(self, data)

How do we remove the "Show more fonts" button when we use wx.FontDialog?

dlg = wx.FontDialog(self, data)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

单调的奢华2025-01-10 06:08:54

wxPython 中的对话框是使用内部操作系统调用创建的,因此它们在不同的操作系统上看起来不同,并且 wxPython 只为它们提供接口。您看到的对话框只是典型的 Windows 7 Font 对话框。

所以问题是我们是否可以更改系统对话框,这个问题的简单答案是:不,那是不可能的。请参阅此主题了解详情。

但是,Windows 7 有多个“字体”对话框模板,您可以选择要使用的模板,但这是一个困难的方法(请参阅 MSDN文章了解详细信息)。

希望这有帮助。

The dialogs in wxPython are created using internal OS calls, so they look differently on different operating systems and wxPython only provides interfaces to them. The dialog you see is just the typical Windows 7 Font dialog box.

So the question is whether we can change system dialog boxes, and the easy answer to this question is: No, that's impossible. See this thread for details.

However, Windows 7 has several Font dialog templates and you can choose what template to use, but that is the hard way (see this MSDN article for details).

Hope this helps.

撩起发的微风2025-01-10 06:08:54

正如 Andrey 所说,你不能这样做,因为 wxPython 正在包装本机对话框。除了他提到的之外,解决此限制的唯一方法是使用 wx.Dialog 滚动您自己的字体对话框。

As Andrey said, you can't do it since wxPython is wrapping the native dialog. The only way around this limitation besides what he mentioned is to roll your own font dialog with wx.Dialog.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文