Add SegmentedControlItem programatically

Is it possible to add a SegmentedControlItem programaticaly ?
I would like to add items on the fly depending on some options.

[quote=138394:@Johann JFK]Is it possible to add a SegmentedControlItem programaticaly ?
I would like to add items on the fly depending on some options.[/quote]

http://documentation.xojo.com/index.php/New
There is an example for a button. Just do the same for the SegmentedControl.

If you already have a segmented control sure
Suppose your segmented control is call, creatively, segmentedcontrol1

dim sci as new SegmentedControlItem
sci.Enabled = true
sci.Title = "Hello"
segmentedcontrol1.items.append sci
segmentedcontrol1.sizetofit

thanks Michel and Norman,

just could not find any documentation, so I thought it is not possible.
But now it makes my work much easier,

thanks again