B boredsilly Member Licensed User Longtime User Feb 25, 2013 #1 Hi, Best to view my code first: B4X: Dim lblPno1 As Label lblPno1.Initialize("") wkLeft=11%x wkWidth=62%x wkTop=(aTop+(i*(aHeight+1)))%y wkHeight=(aHeight)%y lblPno1.Text=Cursor.GetString("Pno") Activity.AddView(lblPno1,wkLeft,wkTop,wkWidth,wkHeight) I'd like to add views with a certain %y value for top and height (the code is within a for loop), is there a way to do this? Regards BoredSilly
Hi, Best to view my code first: B4X: Dim lblPno1 As Label lblPno1.Initialize("") wkLeft=11%x wkWidth=62%x wkTop=(aTop+(i*(aHeight+1)))%y wkHeight=(aHeight)%y lblPno1.Text=Cursor.GetString("Pno") Activity.AddView(lblPno1,wkLeft,wkTop,wkWidth,wkHeight) I'd like to add views with a certain %y value for top and height (the code is within a for loop), is there a way to do this? Regards BoredSilly
Erel B4X founder Staff member Licensed User Longtime User Feb 25, 2013 #2 Yes. You can use PerXToCurrent or PerYToCurrent. B4X: lblPno1.Left = PerXToCurrent(x) Upvote 0