Skip to Content
0
Dec 17, 2022 at 11:38 AM

How To: Set a SegmentedControl Value

272 Views Last edit Dec 18, 2022 at 12:05 PM 4 rev

Hi,

I would like to set my SegmentedControl value using some application settings

I would like to use a simple rule to set that value - like:

export default function GetSegmentedControlValue(clientAPI) {
//Get value from app settings
let appSettings = clientAPI.nativescript.appSettingsModule;
return appSettings.getString('segmentedControlValue');

}

Is there a way I can set that value using one of the other available methods. (I was thinking maybe using the "Control & ClientData" though I'm not sure how that would work in this case)

Thanks for any workaround/example you may have.

Pascal