为 SWT Shell 设置默认字体 [英] Set default font for SWT Shell

查看:34
本文介绍了为 SWT Shell 设置默认字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法为整个 Shell 设置默认字体,这样任何新控件都将使用相同的字体?

Is there a way to set a default font for the whole Shell such that any new control will use that same font?

好像现在我必须为我创建的每个控件设置字体,这会导致过多的冗余.

It seems that right now I have to set the font for every control I create, which leads to too much redundancy.

推荐答案

默认使用的字体由平台选择(参见 类字体 - SWT:标准小部件工具包),因此不可能为所有小部件设置默认字体,如果需要,您可以必须手工"做..

Font which is used by default is chosen by platform (see other info in Class Font - SWT: The Standard Widget Toolkit), so it's not possible to set default font for all widgets, if you want that, you have to do it "by hand"..

你为什么要更改默认字体..?

Why are you changing default font anyway..?

这篇关于为 SWT Shell 设置默认字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆