Quantcast
Channel: Sarina DuPont, Product Manager RAD Studio
Viewing all articles
Browse latest Browse all 132

Creating a segmented control for iOS in RAD Studio XE4

$
0
0

Segmented controls are commonly used in iOS applications today.

In XE4, you can easily style a TSpeedButton to look and behave like a segmented control by changing the stylelookup property and defining a group name.

Below are the steps for quickly creating a (reusable) segmented control component.

  • Place 3 TSpeedButton components onto your form
  • Change the stylelookup property for each TSpeedButton to segmentedbuttonleft, segmentedbuttonmiddle and segmentedbuttonright
  • Select all 3 TSpeedButton components and type in a GroupName (i.e. mysegments)
  • If you want to have one of the segments selected by default, just set the speedbutton’s isPressed property to true.

For easy reuse in the future, select all 3 TSpeedButtons on your form (you can use Shift to multi-select), and go to Component - Create Component Template.


Viewing all articles
Browse latest Browse all 132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>