为什么我不能设置Codename One的SpanLabel的字体?
SpanLabel title = new SpanLabel("SpanLabel");
title.getAllStyles().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE));
Run Code Online (Sandbox Code Playgroud)
不行.
小智 5
SpanLabel title = new SpanLabel("SpanLabel");
**title.getTextAllStyles()**.setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE));
Run Code Online (Sandbox Code Playgroud)
要更改spanlabel样式,应调用getTextAllStyle方法,如上面的代码所示
| 归档时间: |
|
| 查看次数: |
283 次 |
| 最近记录: |