A Andie Member Licensed User Longtime User Feb 7, 2024 #1 I want a png-picture displayed with round corners and a colored border. So, I picked B4XImageView as view type. And as this view is made of a panel named mBase, I tried: B4X: Copy Private myImage As B4XImageView . myImage.Load(File.DirAssets, my_png_pic) myImage.mBase.SetColorAndBorder(Colors.Cyan, 1%y, Colors.Magenta, 5%y) But there was no effect at all. Do I miss something?
I want a png-picture displayed with round corners and a colored border. So, I picked B4XImageView as view type. And as this view is made of a panel named mBase, I tried: B4X: Copy Private myImage As B4XImageView . myImage.Load(File.DirAssets, my_png_pic) myImage.mBase.SetColorAndBorder(Colors.Cyan, 1%y, Colors.Magenta, 5%y) But there was no effect at all. Do I miss something?
klaus Expert Licensed User Longtime User Feb 7, 2024 #2 You can set the CornerRadius as property in the B4XImageView. But the B4XImageView does not have a BorderWidth property. The corner radius of mBase is set internally to the CornerRadius property value and the an Imageview is added onto it covering mBase. The only workaround I see is to add a transparent Panel over the B4XImageView and set its CornerRadius, BorderWidth and BorderColor to your needs. Upvote 1
You can set the CornerRadius as property in the B4XImageView. But the B4XImageView does not have a BorderWidth property. The corner radius of mBase is set internally to the CornerRadius property value and the an Imageview is added onto it covering mBase. The only workaround I see is to add a transparent Panel over the B4XImageView and set its CornerRadius, BorderWidth and BorderColor to your needs.
A Andie Member Licensed User Longtime User Feb 7, 2024 #3 Thanks, Klaus, for your explanation and your workaround. Upvote 0