H Ho Chia Leung Member Licensed User Longtime User Apr 1, 2015 #1 Hi all, I'm utilizing the Text2 of Listview control. Here is my code B4X: For i=0 To cursor1.RowCount -1 cursor1.Position=i food_code= cursor1.GetString("PRODUCT_CODE") food_name = cursor1.GetString("PRODUCT_NAME") food_price = cursor1.GetDouble("PRODUCT_PRICE") lvFood.AddTwoLines2($"${food_code} ${food_name}"$, $"RM $1.2{NumberFormat2(food_price,1,2,2,False)}"$, food_code) Next cursor1.Close lvFood.TwoLinesLayout.Label.TextColor = Colors.Black lvFood.TwoLinesLayout.SecondLabel.Gravity = Gravity.RIGHT This is the result I get Half of my last character is missing when I set gravity to right. How to fix this? Thank you!
Hi all, I'm utilizing the Text2 of Listview control. Here is my code B4X: For i=0 To cursor1.RowCount -1 cursor1.Position=i food_code= cursor1.GetString("PRODUCT_CODE") food_name = cursor1.GetString("PRODUCT_NAME") food_price = cursor1.GetDouble("PRODUCT_PRICE") lvFood.AddTwoLines2($"${food_code} ${food_name}"$, $"RM $1.2{NumberFormat2(food_price,1,2,2,False)}"$, food_code) Next cursor1.Close lvFood.TwoLinesLayout.Label.TextColor = Colors.Black lvFood.TwoLinesLayout.SecondLabel.Gravity = Gravity.RIGHT This is the result I get Half of my last character is missing when I set gravity to right. How to fix this? Thank you!
Erel B4X founder Staff member Licensed User Longtime User Apr 1, 2015 #2 You need to set the label and second label properties before you add items. You can also change the label left property (though it is not clear from this screenshot whether it is required or not here). Upvote 0
You need to set the label and second label properties before you add items. You can also change the label left property (though it is not clear from this screenshot whether it is required or not here).