The line I added already takes the value from CornerRadius property. If you put 0 in CornerRadius in DesignTime, you get a perfect rectangle button, but if you set a value (5 for example), the rectangle will have rounded corners.
I also tried to set the border line in the custom button with the layer.setBorderColor, but the color is a TPointer and I had not time to investigate how to assign it.
Greetings
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In DPF.iOS.UIButton.pas file, you have to add the line:
before the line:
in procedure TDPFButton.Loaded;
This way, if you are using: btCustom as ButtonType, you can assign any value to CornerRadius property and you will get the rounded button corner.
I hope it helps!
Last edit: Diego 2013-08-22
Hi, Diego
Thank you for info.
You can use CornerRadius property, I will fixed a minor bug in this property.
Regards
Hi Babak:
The line I added already takes the value from CornerRadius property. If you put 0 in CornerRadius in DesignTime, you get a perfect rectangle button, but if you set a value (5 for example), the rectangle will have rounded corners.
I also tried to set the border line in the custom button with the layer.setBorderColor, but the color is a TPointer and I had not time to investigate how to assign it.
Greetings
Hi Diego
Download latest source from [code] section and see [Buttons] demo,
Regards
Related
Code: code
I see you have fixed it at BaseControl level...
Great work and thanks once more!