nfordbscndrd Well-Known Member Licensed User Longtime User Feb 12, 2011 #1 I was able to create an array of ImageViews using "Array As ImageView(...)", but when I try "Array As Label(...)", it gives me an error message (just says "error"). Is it not possible to create an array of labels.
I was able to create an array of ImageViews using "Array As ImageView(...)", but when I try "Array As Label(...)", it gives me an error message (just says "error"). Is it not possible to create an array of labels.
agraham Expert Licensed User Longtime User Feb 12, 2011 #2 nfordbscndrd said: Is it not possible to create an array of labels. Click to expand... Yes, but you need instances of the Label type to populate it. Code: Dim L(10) As Label For i = 0 To L.Length Dim LL As Label Ll.Initialize("") L(i) = LL Next Dim L2(0) As Label L2 = Array As Label( L(0), L(1), L(2 )) Upvote 0
nfordbscndrd said: Is it not possible to create an array of labels. Click to expand... Yes, but you need instances of the Label type to populate it. Code: Dim L(10) As Label For i = 0 To L.Length Dim LL As Label Ll.Initialize("") L(i) = LL Next Dim L2(0) As Label L2 = Array As Label( L(0), L(1), L(2 ))
nfordbscndrd Well-Known Member Licensed User Longtime User Feb 12, 2011 #3 I already had the labels set up in Designer and loaded the layout, but in looking at your code, I saw my mistake. In Sub Global where I Dimmed the labels in the layout, I followed that with Dim Labels as Label instead of Dim Labels() as Label I fixed it and it works. Thanks. I need to make an array of 50+ Labels and Buttons because of not being able to set different font sizes for the same Views in different Variants, so I'll have to change them programmatically, unless you can think of something I'm doing wrong in Designer. Upvote 0
I already had the labels set up in Designer and loaded the layout, but in looking at your code, I saw my mistake. In Sub Global where I Dimmed the labels in the layout, I followed that with Dim Labels as Label instead of Dim Labels() as Label I fixed it and it works. Thanks. I need to make an array of 50+ Labels and Buttons because of not being able to set different font sizes for the same Views in different Variants, so I'll have to change them programmatically, unless you can think of something I'm doing wrong in Designer.
K kickaha Well-Known Member Licensed User Longtime User Feb 13, 2011 #4 I thought fonts were automatically scaled for the different variants, or have I misunderstood something Upvote 0
I thought fonts were automatically scaled for the different variants, or have I misunderstood something
nfordbscndrd Well-Known Member Licensed User Longtime User Feb 13, 2011 #5 kickaha said: I thought fonts were automatically scaled for the different variants, or have I misunderstood something Click to expand... That's my question. I have been working on this layout for two days and everytime I change the fonts in one layout, they change in the others. Upvote 0
kickaha said: I thought fonts were automatically scaled for the different variants, or have I misunderstood something Click to expand... That's my question. I have been working on this layout for two days and everytime I change the fonts in one layout, they change in the others.
Erel B4X founder Staff member Licensed User Longtime User Feb 13, 2011 #6 Changing the font size value of a view in the designer will change the value for all variants. In most cases you will want to have the same font size as the font size is automatically scaled based on the current device scale. Upvote 0
Changing the font size value of a view in the designer will change the value for all variants. In most cases you will want to have the same font size as the font size is automatically scaled based on the current device scale.