Reputation: 421
Why can't I set the font of a SpanLabel of Codename One?
SpanLabel title = new SpanLabel("SpanLabel");
title.getAllStyles().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE));
Doesn't work.
Upvotes: 3
Views: 506
Reputation: 1907
SpanLabel title = new SpanLabel("SpanLabel");
**title.getTextAllStyles()**.setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE));
To change style of spanlabel getTextAllStyle method should be called as shown in above code
Upvotes: 5