iOS / Button / Text Alignment

Hello Community,

in an iOS test project with Xojo 2019r3.1 I saw that it is not possible to align text in Buttons but in Labels.

In some forum posts it is mentioned that you can align text in Buttons via Declares.

I tried the iOS extensions from Jeremy. When I integrate these extensions into my project and press run I got several errors.
Are these extensions not usable in 2019r3.1? What is the highest Xojo version to use them?

Does someone has an Example project / code with declares to align text in button which is running with 2019r3.1?

As you can do this via declares it is possible to align text in buttons with Xcode and swift/objective-c.
Is there a technical reason why this is not available in Xojo? Will it come in a future version of Xojo?

I checked feedback cases but could not find an existing public case. Does it make sense to create one?

Regards

–Christian

perhaps this provides a hint? (I don’t do "Xojo for iOS) … but this is how SWIFT does it

mybutton.contentHorizontalAlignment = <left|right|center|fill|trailing>

No there is no “technical” reason, the just decided to not put all the necessary propertys (my opinion)
Future version… possible… but don’t bet on it… look at what is available, and pick you tools accordingly

I will update iOSDesignExtensions for Xojo 2019r3.1 throughout the weekend

[quote=475454:@Dave S]perhaps this provides a hint? (I don’t do "Xojo for iOS) … but this is how SWIFT does it

mybutton.contentHorizontalAlignment = <left|right|center|fill|trailing>

[/quote]

Thank you for your information. I may try it when I start to learn how to use declares. I checked a video and the documentation. Atm it is hard for me to understand declares.

Many thanks. I can offer to test it. If I have feedback from tests which communication channel would you prefer, forum, mail or another?

Also a big thank you that iOSDesignExtensions exists :slight_smile: