Codenameone - change dialog commands appearance

2019-09-06 20:48发布

问题:

I have developed a mobile application, and I used leather theme. when i use Dialog.show() the command buttons are not visible enough and I need to change the background and foreground.

Actually I am not sure which component I need to customize with Codename One Designer?

回答1:

In the theme constants tab you can set the dlgButtonCommandUIID variable to the UIID you want the buttons to take. The default is Button so customizing the Button UIID should work just fine.

Background for the buttons in the leather theme is a border, if you want to change that you need to override the Border style with an empty border or a new border type. Check out the videos in the How Do I? section that cover these things.