N Nitin Joshi Active Member Licensed User Longtime User May 23, 2021 #1 I am using B4XComboBox having textcolor white. However, as text color is set white, when clicked on combo box to select the item, user can not see the values as background after click is also white. Attached is the snapshot for the reference. I have tried following code but it does change background of ComboBox however on Code: Dim cd As ColorDrawable cd.Initialize(Colors.Transparent,0) ComboBox1.cmbBox.Background=cd click background remains white. Attachments Combo box white background.JPG 12.6 KB · Views: 410
I am using B4XComboBox having textcolor white. However, as text color is set white, when clicked on combo box to select the item, user can not see the values as background after click is also white. Attached is the snapshot for the reference. I have tried following code but it does change background of ComboBox however on Code: Dim cd As ColorDrawable cd.Initialize(Colors.Transparent,0) ComboBox1.cmbBox.Background=cd click background remains white.
Erel B4X founder Staff member Licensed User Longtime User May 23, 2021 #2 You should never see ColorDrawable in your code. Use B4XView.SetColorAndBorder or Color property instead. You can change ComboBox1.cmbBox.DropdownBackgroundColor or change the theme from dark to light (or the opposite) in the manifest editor. Upvote 0
You should never see ColorDrawable in your code. Use B4XView.SetColorAndBorder or Color property instead. You can change ComboBox1.cmbBox.DropdownBackgroundColor or change the theme from dark to light (or the opposite) in the manifest editor.
N Nitin Joshi Active Member Licensed User Longtime User May 23, 2021 #3 Erel said: Use B4XView.SetColorAndBorder Click to expand... Can you please help me on this? I mean, i do not know how to use Erel said: Color property instead. Click to expand... I did not find dropdownbackground color selection in color properties.... Erel said: change the theme from dark to light (or the opposite) in the manifest editor. Click to expand... I have never used manifest to apply the them. Can you please provide syntax for the same? However, in some cases ComboBox requires light theme and in some cases dark theme then i believe manifest editor will not be useful. Upvote 0
Erel said: Use B4XView.SetColorAndBorder Click to expand... Can you please help me on this? I mean, i do not know how to use Erel said: Color property instead. Click to expand... I did not find dropdownbackground color selection in color properties.... Erel said: change the theme from dark to light (or the opposite) in the manifest editor. Click to expand... I have never used manifest to apply the them. Can you please provide syntax for the same? However, in some cases ComboBox requires light theme and in some cases dark theme then i believe manifest editor will not be useful.
M Mahares Expert Licensed User Longtime User May 23, 2021 #4 Nitin Joshi said: Can you please help me on this? I mean, i do not know how to use Click to expand... Code: Dim b As B4XView=B4XComboBox2.cmbBox b.SetColorAndBorder(xui.Color_Red, 5dip, xui.Color_Yellow, 10dip) Nitin Joshi said: I did not find dropdownbackground color selection in color properties.... Click to expand... Code: B4XComboBox2.cmbBox.DropdownBackgroundColor =xui.Color_Magenta For the manifest: Code: CreateResourceFromFile(Macro, Themes.DarkTheme) or: Code: CreateResourceFromFile(Macro, Themes.LightTheme) Upvote 0
Nitin Joshi said: Can you please help me on this? I mean, i do not know how to use Click to expand... Code: Dim b As B4XView=B4XComboBox2.cmbBox b.SetColorAndBorder(xui.Color_Red, 5dip, xui.Color_Yellow, 10dip) Nitin Joshi said: I did not find dropdownbackground color selection in color properties.... Click to expand... Code: B4XComboBox2.cmbBox.DropdownBackgroundColor =xui.Color_Magenta For the manifest: Code: CreateResourceFromFile(Macro, Themes.DarkTheme) or: Code: CreateResourceFromFile(Macro, Themes.LightTheme)
N Nitin Joshi Active Member Licensed User Longtime User May 23, 2021 #5 Thanks for nice feedback. I have a doubt...I can either apply dark or light theme, now suppose, if i apply dark theme however in case (in same project) combo box is required light then i need to apply colors for light theme by coding? Upvote 0
Thanks for nice feedback. I have a doubt...I can either apply dark or light theme, now suppose, if i apply dark theme however in case (in same project) combo box is required light then i need to apply colors for light theme by coding?
Erel B4X founder Staff member Licensed User Longtime User May 24, 2021 #6 The app theme is indeed global. Upvote 0