Named Objects design proposal

 From:  Michael Gibson
7108.5 In reply to 7108.3 
Hi Robert,

> Can you point me to any scripts that are dialogue boxes like one of the
> ones you mentioned but have several tabs like the side panel.

I'm not aware of any script that has those kind of tabs in it, but you can use the same tab control that the side pane uses. You'll find the side pane code inside the \ui sub-folder, in the file SidePane.htm. If you look in there you'll see some tab controls, like for example here is the one for the Draw curve / Draw solid tabs:

code:
	<moi:Tabcontainer>
		<moi:TabButton id="DrawCurveTab"><moi:Text textid="Draw curve tab"/></moi:TabButton>
		<moi:TabButton id="DrawSolidTab"><moi:Text textid="Draw solid tab"/></moi:TabButton>
	</moi:Tabcontainer>


The <moi:Tabcontainer> element has an activeTab property that can be referenced on it, and it fires an ontabchange event when the tab changes, if you put an ontabchange="" event handler on the tab container that will get called when the tab control changes and you will then want to look at the tab control's activeTab value and show or hide other stuff depending on that value.


> Can a dialogue script contain more than one control?

A dialog can have any number of controls on it.


> And any scripts that have a checkbox whose value can be read by the script? Thanks!

A checkbox control can be placed by using a <moi:CheckButton>button text label</moi:CheckButton> control. Give the control an id="" value like id="mycheckbox" and then the value of it can be read in script by retrieving the .value property, like mycheckbox.value .

- Michael