hi
I have a navigation bar in my app. It has 3 labels which size themselves based on the screen width. Each label has an image assigned to their background(done in the designer) the images are smaller then the label widths.
If the user clicks one of the labels I want to change the background image, but when I do the result is a distorted backgound. How can I maintain the aspect ratio as it it when the app load ?
the settings in the designer are;
Thanks.
John.
I have a navigation bar in my app. It has 3 labels which size themselves based on the screen width. Each label has an image assigned to their background(done in the designer) the images are smaller then the label widths.
If the user clicks one of the labels I want to change the background image, but when I do the result is a distorted backgound. How can I maintain the aspect ratio as it it when the app load ?
B4X:
Sub lblSettings_Click
lblSettings.Gravity = Gravity.CENTER
lblSettings.SetBackgroundImage(LoadBitmap(File.DirAssets, "settings_on.png"))
End Sub
the settings in the designer are;
Thanks.
John.