need help with segmented control.

I looked through the examples and found a pretty good example of how to use the segmented web control to ‘emulate’ a segmented control.
I created the WebRectangle underneath the WebSegmentedControl.
My segmented control has three segments and I have a container control for each segment.
All the sub controls would have their visibility set to false until the appropriate segment is selected by the user at which time the visibility property is set to true…

To summarize my question… How do I embed the controls within the WebRectangle?
Embedwithin requires a webview as a parameter… what would that argument be in this case…

First, I assume by “emulate a segmented control” you mean emulate a page panel control. Second, why are you using a WebRectangle? All of your controls that should appear in a “page panel” should be in one of the container controls, and you hide/show the containers based on which segment is selected. Hiding the container takes care of hiding all controls on that container.

I am building from the example TabPanelExample which has all control drawn in the ide and then at run time each is set to visible / invisible. At design time are all on the same page and visible.

They used a rectangle to ‘hold’ the contents of the run time controls… (Are you saying to get rid of the rectangle and use a ‘dummy’ container control into which i embed the run time container controls?

I am doing something slightly different which is that each tab has its own container control that it wants set to visible within the rectangle.

I for now:

embedwith(self,, rect.left+5, cc.width-5, cc.height-5) cc.visible
but wanted to know if there was a way to use the rectangle as the webView to pass to embed within.

The rectangle is just window dressing. It does not “contain” the controls. The controls are actually in the container controls called FirstTab and SecondTab. Then these container controls are added to the MainPage webpage as FirstTab1 and SecondTab1, on top of each other and on top of the rectangle (not “contained” within it). Then these containers are hidden/shown as necessary to emulate a TabPanel.

You say you want to add/embed the container controls at runtime. To do that, remove the containers from the webpage in the IDE, then in code embed the containers into the webpage. If you want to keep the rectangle, make sure the container controls have a zindex value higher than the rectangle, otherwise the rectangle will cover them up.