cancel
Showing results for 
Search instead for 
Did you mean: 

Drop-down component disable in Design Studio

Former Member
0 Kudos

Hi All,

I created multiple tabs in tab-strip. I inserted multiple drop-down components in a panel which manipulates  the components in all tabs. When i go to tab1 i tried to disable some drop-down components and after going to tab2 some drop-downs have to be enable and some to be disable. For that i wrote some code which is, expample, in tab2  "if (tab2.setEnabled)

{

  Drop_dwn2.setenabled(false);

}"   . but it is not working fine.

Regards,

Sud.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sud,

The code is not appropriate,

try

if(TABSTRIP_1.getSelectedTabIndex==1)

{ the code}

indexes start from 0

Regards,

Fazith Ali Z

Former Member
0 Kudos

Hi Sheik,

Its is not working. I tried with

if(tabstrip_1.getselectedtabindex==2)

{

    Drop_dwn_2.setEnable(false);

}

But, when i move to tab2. still dropdown is enabled and it is working.

Karol-K
Advisor
Advisor
0 Kudos

pay atention that "getselectedtabindex" is a function, so you need "()" at the end, also indices are starting with 0 as Fazith has written, in "setEnabled" you missed a "d" at the end.


your code should be:


if (TABSTRIP_1.getSelectedTabIndex() == 1) {

    DROPDOWN_2.setEnabled (false);

}

works now?

Former Member
0 Kudos

Hi Harol,

Nope. Do i need to mention this code on application level or component's on event?

Karol-K
Advisor
Advisor
0 Kudos

you need to place the code in the event of tabstrip, there is an event "onChange". can it be that your code is just not triggered?

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sud,

The code is not appropriate,

try

if(TABSTRIP_1.getSelectedTabIndex==1)

{ the code}

indexes start from 0

Regards,

Fazith Ali Z

Former Member
0 Kudos

Hi Karol,

Yeah i wrote code on tabstrip on select only. But its not working.

Hi Shiek,

Yeah i changed the code but still cant able to disable.

Former Member
0 Kudos

Hi  Karol/ Sheik,

Its working good fine now.Thanks

Regards,

Sud.

Former Member
0 Kudos

Hi Sud,

The code is not appropriate,

try

if(TABSTRIP_1.getSelectedTabIndex==1)

{ the code}

indexes start from 0

Regards,

Fazith Ali Z