iOSSegmentedControl text size and height

Two Questions:
How could I change the text size of a iOSSegmentedControl?
How could I change height of a iOSSegmentedControl?
In the example project is a iOSSegmentedControl with height 40 and I could change the height, but in my project every iOSSegmentedControl have the height 29 and that value could not changed. If I copy the of the example project in my project the height is 40, but I also could not change it anymore.

Regards
Jens

[quote=153057:@Jens Holloch]Two Questions:
How could I change the text size of a iOSSegmentedControl?
How could I change height of a iOSSegmentedControl?
In the example project is a iOSSegmentedControl with height 40 and I could change the height, but in my project every iOSSegmentedControl have the height 29 and that value could not changed. If I copy the of the example project in my project the height is 40, but I also could not change it anymore.[/quote]

Please note that this works, but it is not at all documented in the native SegmentedControl. I do not think it is sanctioned by Xojo, and it could break in future versions.

  • Drag a button on the view
  • Make it the height you want. For instance 40
  • On top of the inspector, change the Super to iOSSegmentedControl

You will then be able to change the height in the constraints.

For the text size, I do not think it is possible to change it, as it is not available in the native control.

The alternative is to use a Canvas, and to draw the rounded rectangle and separator, as well as the text in any size and font, then use PointerDown to catch the user tap.