Autosizing form title

12 views
Skip to first unread message

Bryan Buchanan

unread,
Feb 14, 2017, 3:26:14 PM2/14/17
to CodenameOne Discussions
This doesn't seem to have any effect:

        Form hi = new Form("A form with a very, very, very long title");
        hi.getTitleComponent().setAutoSizeMode(true);

not sure if it should ?

Shai Almog

unread,
Feb 15, 2017, 1:14:35 AM2/15/17
to CodenameOne Discussions
It's because of the Toolbar the API's are now different. This works:

        Form hi = new Form("A form with a very, very, very very very very very long title");
       
((Label)hi.getToolbar().getTitleComponent()).setAutoSizeMode(true);
       
        hi
.show();


Reply all
Reply to author
Forward
0 new messages