Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

Combobox using the ::SelectedIndex method

$
0
0

My form consists of several dropdown list 'Comboboxes' with several values in each box.

The first time into the code I'm setting up textboxes which accompany these boxes like so...

setmystringtoEMPMAIN-USC-RATE(1).

setTax-USC-R1::SelectedIndextoTax-USC-R1::FindStringExact(mystring::TrimEnd(' '))

setuscIndextoTax-USC-R1::SelectedIndex.

>> If Rate 1 is ZERO then disable all entry boxes for USC

ifuscIndex = Zero

setTAX-USC-R1-ACO::EnabledtoFalse

setTAX-USC-R1-PCO::EnabledtoFalse

setTAX-USC-R2::EnabledtoFalse

etc etc..

I have 'SelectedIndexChanged' methods attached to each Combobox where I want the user to be taken should they change the initial value thats in the Combobox. The problem is that the code is bouncing to the 'SelectedIndexChanged' method in the initial set up of the boxes which I do not want it to do. Is there a way around this problem?

e.g I only want the 'SelectedIndexChanged'  code to be done IF the user physically changes the value already present and NOT when I set the initial value?


Viewing all articles
Browse latest Browse all 4356

Trending Articles