codenameone - 只看到组件的一半字母 - cn1
问题描述
我使用了粗体 ttf 字体,它可以工作,但只看到一半的字母。
代码:
public void start() {
if (current != null) {
current.show();
return;
}
Label testLabel = new Label("Bold Font Not Working");
testLabel.setUIID("smallBold");
Form splashForm = new Form(new BorderLayout());
splashForm.add(BorderLayout.CENTER, BoxLayout.encloseY(testLabel));
splashForm.show();
splashForm.revalidate();
}
未选中、选中和按下样式的主题中的 UIID
现在的样子
但是,无需将其包装在 boxlayout 或 flowlayout 中,而是直接将其添加到带有边框布局的表单中即可。PS如果表格在boxlayout中,它不起作用
代码:
public void start() {
if (current != null) {
current.show();
return;
}
Label testLabel = new Label("Bold Font Not Working");
testLabel.setUIID("smallBold");
Form splashForm = new Form(new BorderLayout());
splashForm.add(BorderLayout.CENTER, testLabel);// this works
splashForm.show();
splashForm.revalidate();
}
标签未包装在其他容器中时的图像
解决方案
推荐阅读
- javascript - 期望赋值或函数调用,但在函数中看到表达式错误
- c++ - 尝试使用接口块从 V.Shader->G.Shader->F.Shader 传递信息时出现顶点着色器编译错误
- java - 无法解析符号视图
- apache-kafka - 未订阅主题的 Kafka Streams 警告
- google-app-maker - 把钥匙放在错误的记录上
- javascript - 如何在图表js圆环图中添加华氏符号
- php - 将多个图像和文本合并为单个图像但无法正确排列
- python - 地理编码以获取数据框中的坐标
- c++ - 如何使用 MSVC 2019 创建和使用 Qt 5.14.0 自定义小部件插件?
- julia - 数组数组上的迭代器产品