codenameone - Codename One add icon to title -


i trying add icon title/ title bar.

changing title code works fine : settitle("testing");

yet can't figure out way add icon it. here have tried, no avail:

    image img = image.createimage("/kalender.png");     gettitlecomponent().seticon(img);      fontimage icon = fontimage.creatematerial(fontimage.material_search, "titlecommand", 3);     gettitlecomponent().seticon(icon); 

any appreciated.

settitlecomponent solve in below

fontimage icon = fontimage.creatematerial(fontimage.material_search, "titlecommand", 3);    label title = new label(icon);  **settitlecomponent(title);** 

[edit]

 **gettoolbar().settitlecomponent(titles);** 

Comments

Popular posts from this blog

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -