R ranul Member Licensed User Longtime User Sep 16, 2019 #1 Hi, I wish that when I disabled a button (btn.Enabled = False), the button text will change its color to the standard disabled color. It does work that way with ComboBox text. Thanks.
Hi, I wish that when I disabled a button (btn.Enabled = False), the button text will change its color to the standard disabled color. It does work that way with ComboBox text. Thanks.
Erel B4X founder Staff member Licensed User Longtime User Sep 16, 2019 #2 This is the default behavior of buttons with the default JavaFX theme. It is quite simple to change it. Add a file named style.css to the Files tab with this content: B4X: .button:disabled, .button:default:disabled { -fx-text-fill: gray; } Load it with: B4X: MainForm.Stylesheets.Add(File.GetUri(File.DirAssets, "style.css"))
This is the default behavior of buttons with the default JavaFX theme. It is quite simple to change it. Add a file named style.css to the Files tab with this content: B4X: .button:disabled, .button:default:disabled { -fx-text-fill: gray; } Load it with: B4X: MainForm.Stylesheets.Add(File.GetUri(File.DirAssets, "style.css"))