How to use pagenames property dynamically

Hello,

Anyone tell me how to visible PageNames property dynamically of tab control.

I use tab control with Pagenames property p1,p2,p3,p4 and dropdown control with option string type1,type2.

If i select type1 then visible p1,p2.

and type2 then visible p3,p4…

Can any one give me sol ??

Leena

Hi,

you can set page order to 1.2.3.4 for pages p1,p2,p3,p4 this is very simple method for finding a tabpage,

and then override dropdown:onselectionchange command;

public int selectionChange()
{
int ret;

FormTabPageControl checktab;

boolean visibleret0group = false;

ret = super();

//ret = 0 then type1

//ret = 1 then type 2

if (ret== 0)

visibleret0group = true;

checktab= tabControlx.controlNum(tabControlx.tabs(1));

checktab.visible(visibleret0group ); // if ret== 0 then tabPage1 now visible

checktab= tabControlx.controlNum(tabControlx.tabs(2));

checktab.visible(visibleret0group ); // if ret== 0 then tabPage2 now visible

checktab= tabControlx.controlNum(tabControlx.tabs(3));

checktab.visible(!visibleret0group ); // if ret== 0 then tabPage3 now hide

checktab= tabControlx.controlNum(tabControlx.tabs(4));

checktab.visible(!visibleret0group ); // if ret== 0 then tabPage4 now hide

return ret;
}

a bit long method but i think will be solved your problem.

regards.

Helo Selo,

Thank for give me reply…

But this code is not support in navision.

Pls give me proper sol for navision.

Thanks

Leena

Upps,

Sory m8 i’m only developing on axapta, i haven’ t developed on nav. i don’t have any idea.

Regards.