[RESOLVED] Button Control Properties
hey everyone. in vb.net (express edition) im trying to change multiple button properties at the same time. if i want to change the button width, this works
Code:
For i = 1 To 42
With Calendar.Panel1.Controls("Button" & i)
.width= 12
End With
Next
but if i want to change the button border, this wont work:
Code:
For i = 1 To 42
With Calendar.Panel1.Controls("Button" & i).FlatAppearance
.bordersize = 12
End With
Next
whats the difference and how do i get it working?
thanks
jason
Re: Button Control Properties
Is your button FlatStyle set to Flat? The default is Standard, in which case setting the FlatAppearance border has no effect.
Re: Button Control Properties
you need to cast it as a button:
vb Code:
For i = 1 To 42
With directcast(Calendar.Panel1.Controls("Button" & i), Button).FlatAppearance
.bordersize = 12
End With
Next
Re: Button Control Properties