I'm sure I'm doing something wrong but can't figure it out.
My app initially had rectangular buttons that looked good but I wanted a rounded look so I tried ColorDrawable. I have it set up in my code as:
Dim cdAll As ColorDrawable
cdAll.Initialize2( Colors.LightGray, 10dip, 1dip, Colors.Blue)
The problem is that when I set my buttons like "buttonClose.Background = cdAll", Some look great. Some are rounded on the left end and square on the right end. Some end up being half their original (rectangular) size.
In the designer I have them all setup like this:
delta = ((100%x + 100%y) / (320dip + 460dip) - 1)
rate = 0.1 'value between 0 to 1.
scale = 1 + rate * delta
x1 = 100%x
y1 = 100%y
x2 = 50%x
y2 = 50%y
l = 5
t = 420
w = 310
h = 40
buttonClose.Left = l/320*x1
buttonClose.Width = w/320*x1
buttonClose.Top = t/460*y1
buttonClose.Height = h/460*y1
buttonClose.SetLeftAndRight(l/320*x1,l/320*x1 + w/320*x1)
buttonClose.SetTopAndBottom(t/460*y1,t/460*y1 + h/460*y1)
buttonClose.TextSize = buttonClose.TextSize * scale
I can see no reason some would be good and others bad since they are all set up the same way and in many cases, are copies of each other.
This is version 8.80
Thanks for any help.
My app initially had rectangular buttons that looked good but I wanted a rounded look so I tried ColorDrawable. I have it set up in my code as:
Dim cdAll As ColorDrawable
cdAll.Initialize2( Colors.LightGray, 10dip, 1dip, Colors.Blue)
The problem is that when I set my buttons like "buttonClose.Background = cdAll", Some look great. Some are rounded on the left end and square on the right end. Some end up being half their original (rectangular) size.
In the designer I have them all setup like this:
delta = ((100%x + 100%y) / (320dip + 460dip) - 1)
rate = 0.1 'value between 0 to 1.
scale = 1 + rate * delta
x1 = 100%x
y1 = 100%y
x2 = 50%x
y2 = 50%y
l = 5
t = 420
w = 310
h = 40
buttonClose.Left = l/320*x1
buttonClose.Width = w/320*x1
buttonClose.Top = t/460*y1
buttonClose.Height = h/460*y1
buttonClose.SetLeftAndRight(l/320*x1,l/320*x1 + w/320*x1)
buttonClose.SetTopAndBottom(t/460*y1,t/460*y1 + h/460*y1)
buttonClose.TextSize = buttonClose.TextSize * scale
I can see no reason some would be good and others bad since they are all set up the same way and in many cases, are copies of each other.
This is version 8.80
Thanks for any help.