Div/Tab

Notes for using Div/Tab

This describes about caution for using Div/Tab

Event order (onload)

When there is Div or Tab component in form, onload event order is that onload event of  form connected to Div/Tab occurs first. 
And onload event of main form including Div/Tabpage occurs.

Way of accessing

Preload property of Tab component

In case preload property value is true, if there are many connected Tabpages, this causes system load.

So use preload property carefully.

Connecting to Div/Tab component dynamically

When you assign page dynamically using script, you need to pay attention to timing to access to form.

Setting url to Div component

this.Div00.set_url("Base::SubDiv.xfdl");
this.Div00.fn_search();

Connect url to Div -> access at onload event of connected form to function of parent form -> access at parent form to form connected to Div

In case async value of Div property is false, We can access to child immediately after changing url.

In case url is changed in child of Div, async property value must be true so program is not stopped abnormally.

Setting url to Tab component

this.Tab00.tabpage1.set_url("Base::SubTabpage.xfdl");
this.Tab00.tabpage1.fn_search();

Connect to url of tabpage -> access function of parent form at onload event of connected form -> access form connected tabpage at parent form

In case async value of tabpage property is false, we can access child immediately after changing url.

In case url is changed at child of tabpage, async property must be true so program is not stopped abnormally.

Accessing way to Div/Tab component connected to form

Accessing to subform connected to Div/Tab at form

this.Div00.Edit00.text;
this.Tab00.tabpage1.Edit00.text;
We can access based on form (this) as above.
In case Div or Tab are piled up, access according to depth.
ex)
this.Div00.Div01.Tab00.tabpage1.Edit00.text

Accessing way to parent form at sub form connected to Div/Tab

We can access to parent form using parent property.
//Form connected to Div : 
trace(this.parent); //Parent form of Div   
//Form connected to Tabpage : 
trace(this.parent); //  Parent tab of tabpage 
trace(this.parent.parent) // Parent form of Tab

Div

A number of sections on the screen or the screen configuration component to component group managing Div How to implement the functionality presented.

Passing parameters to link by URL from Div

Using url property of Div component we can connect to another screen, by using parent's property we can receive passing parameters from previous screen.

Div_SendParameter_0

Main Source Content

Div main page

/*
 * File Name   : Div_SendParameter
 * Description : Passing parameters to link by URL from Div
 */
this.fv_param = "";
this.btn_execute_onclick = function(obj:Button,  e:nexacro.ClickEventInfo)
{
    this.fv_param = this.edt_input0.text; 
}

Div url Link Page

/*
 * File Name   : Div_SendParameter_Sub
 * Description : Passing parameters to link by URL from Div
 */
this.btn_execute_onclick = function(obj:Button,  e:nexacro.ClickEventInfo)
{
    this.alert(this.parent.fv_param); 
}

The url page is which is connected to screen, values will be available after loading page.

Div, Parameter, parent

Source Location

Sample\Div\np_Div_SendParameter.xfdl
Sample\Div\np_Div_SendParameter_Sub.xfdl

Tab

MultiLine

If total size of tab buttons exceeds from the size of the component then spin is appeared automatically.

Tabpage_multine_1

We can set property of Tab using “properties” tab and also can change using script.

Way to set Properties

Tabpage_multine_3

Tabpage_multine_0

Changing property using script

this.Radio00_onitemchanged = function (obj:Radio, e:ItemChangeEventInfo)
{
 if (this.Radio00.value == 'Single') 
 {
  this.Tab00.set_multiline(false);
 }
 else 
 {
  this.Tab00.set_multiline(true);
 }
}

Can TabPage be expressed using multiline forms?

Source Location

Sample\TabPage\np_TabPage_Multiline.xfdl

Position

By setting tabposition and multiline properties of Tab, we can set the location of the TabPage

Tabpage_position_0

Tabpage_position_0

We can set property of Tab using “properties” and also can change using script. 

Way to set Properties

Tabpage_multine_3

Tabpage_position_1

Way to set using Script

this.Radio00_onitemchanged = function (obj:Radio, e:ItemChangeEventInfo)
{
 this.Tab00.set_tabposition(e.postvalue);
}
this.Radio01_onitemchanged = function (obj:Radio, e:ItemChangeEventInfo)
{
 if (obj.value == 'Single') 
 {
  this.Tab00.set_multiline(false);
 }
 else 
 {
  this.Tab00.set_multiline(true);
 }
}

Is it possible to move title of TabPage up / down / left / right?

Source Location

Sample\TabPage\np_TabPage_Position.xfdl

Changing Index of TabPage

If there are many tab pages, we can choose TabPage by using mouse and we can also choose TabPage by using Script.

Changing Index using by Script

Tabpage_tabindex_0

Way to set Properties

Tabpage_tabindex_2

Changing Index using by Script

this.Button00_onclick = function (obj:Button, e:ClickEventInfo)
{
     this.Tab00.set_tabindex(this.Spin00.value);
}

Index of TapPage starts from 0.

Can we change index of TabPage by using Script?

Source Location

Sample\TabPage\np_TagPage_TabIndex.xfdl
//Div에 연결된 폼 : 
trace(this.parent); //Div가 속한 부모 폼
//Tagpage연결된 폼 : 
trace(this.parent); //tabpage가 속한 Tab
trace(this.parent.parent) //Tab이 속한 부모 폼