D davemorris Active Member Licensed User Longtime User Mar 6, 2023 #1 Hi, Guys I have a problem with setting the alignment of text in the B4XComboBox view so it is right aligned. Tried setting the Label Properties -> Text Alignment to Right in the designer but it appears not to work (it always appears to centre the text). Can anyone help. Regards Dave
Hi, Guys I have a problem with setting the alignment of text in the B4XComboBox view so it is right aligned. Tried setting the Label Properties -> Text Alignment to Right in the designer but it appears not to work (it always appears to centre the text). Can anyone help. Regards Dave
Solution Erel Mar 7, 2023 Code: Copy Dim no As NativeObject = B4XComboBox1.mBtn no.SetField("contentHorizontalAlignment", 2) no.RunMethod("setContentEdgeInsets:", Array(no.MakeEdgeInsets(0, 0, 10, 0)))
Code: Copy Dim no As NativeObject = B4XComboBox1.mBtn no.SetField("contentHorizontalAlignment", 2) no.RunMethod("setContentEdgeInsets:", Array(no.MakeEdgeInsets(0, 0, 10, 0)))
Erel B4X founder Staff member Licensed User Longtime User Mar 7, 2023 #2 Code: Copy Dim no As NativeObject = B4XComboBox1.mBtn no.SetField("contentHorizontalAlignment", 2) no.RunMethod("setContentEdgeInsets:", Array(no.MakeEdgeInsets(0, 0, 10, 0))) Upvote 0 Solution
Code: Copy Dim no As NativeObject = B4XComboBox1.mBtn no.SetField("contentHorizontalAlignment", 2) no.RunMethod("setContentEdgeInsets:", Array(no.MakeEdgeInsets(0, 0, 10, 0)))
D davemorris Active Member Licensed User Longtime User Mar 11, 2023 #3 Hi, Erel It works thanks for the input Dave Upvote 0