The name suggests that it will resize the contained segments to fit the size of the segmentedButton control. However it does NOT resize the contained segments, it resizes the control.
Suggest renaming function to “segmentedButton.resizeControlToFitSegments”. Before I file a feature request, any thoughts?