[Resolved] Q re widget.newSegmentedControl in build 947

I couldn’t find any information in API docs 947, just the sample in new widget demo.

I’m wondering if it’s possible to specify the button width.
I didn’t see any parameter for width in the sample, hopefully I just missed it.
[import]uid: 6547 topic_id: 32666 reply_id: 332666[/import]

Very sorry about this.

Our docs don’t seem to be in sync at all lately.

You can set the width for sure.

Here are the complete list of properties you can pass to your constructor ( just posting here so your not blocked waiting for the docs to sync up)

  
local segmentedControl = widget.newSegmentedControl  
{  
 segments = { "One", "Two", "Three" },  
 segmentWidth = 50, -- This is the width of each segment  
 labelSize = 12, -- This is the size of the segment label  
 labelFont = native.systemFont, -- This is the font of the segment label  
 labelXOffset = 0, -- This is a x Offset you wish to apply to the segment labels  
 labelYOffset = 0, -- This is a y Offset you wish to apply to the segment labels  
 onPress = onSegmentPress, -- This is your onPress event listener  
}  

[import]uid: 84637 topic_id: 32666 reply_id: 129880[/import]

Very sorry about this.

Our docs don’t seem to be in sync at all lately.

You can set the width for sure.

Here are the complete list of properties you can pass to your constructor ( just posting here so your not blocked waiting for the docs to sync up)

  
local segmentedControl = widget.newSegmentedControl  
{  
 segments = { "One", "Two", "Three" },  
 segmentWidth = 50, -- This is the width of each segment  
 labelSize = 12, -- This is the size of the segment label  
 labelFont = native.systemFont, -- This is the font of the segment label  
 labelXOffset = 0, -- This is a x Offset you wish to apply to the segment labels  
 labelYOffset = 0, -- This is a y Offset you wish to apply to the segment labels  
 onPress = onSegmentPress, -- This is your onPress event listener  
}  

[import]uid: 84637 topic_id: 32666 reply_id: 129880[/import]

Perfect, thanks Danny! [import]uid: 64538 topic_id: 32666 reply_id: 129895[/import]

Perfect indeed. Thank you.

Off to experiment, I.e. change the label text on the fly. [import]uid: 6547 topic_id: 32666 reply_id: 129908[/import]

Perfect, thanks Danny! [import]uid: 64538 topic_id: 32666 reply_id: 129895[/import]

Perfect indeed. Thank you.

Off to experiment, I.e. change the label text on the fly. [import]uid: 6547 topic_id: 32666 reply_id: 129908[/import]