Hola,
Quisiera la ayuda de ustedes.
Tengo problemas para comprender el funcionamiento del interruptor (switch).
Necesito utilizar varios para una misma función, por ejemplo:
Al presionar botón para calcular hará una multiplicación de A * B = C.
Al encender interruptor aparecerá una pantalla donde existan 3 interruptores mas, al apagar se esconde y/o borra lo anterior. (ya resuelto)
Los 3 interruptores que aparecerán (secundarios), les daré nombres de leve (D), moderado (E) y severo (F). Cada interruptor encendido tendrá un valor distinto, los cuales tendrán que multiplicarse por valor de un campo de texto (G) y sumarse a la multiplicación inicial de A * B = C
Al encender cualquier interruptor leve se apagará en automático los de moderado y severo, y así cada uno respectivamente (también resuelto)
El punto a cuestionar es ¿Cómo hago para que al encender el interruptor leve (D), se multiplique su valor con el campo de texto (G)? y así cada interruptor encendido y el resultado se plasme en una etiqueta (H).
Hello,
I would like your help.
I'm having trouble understanding how a switch works.
I need to use several switches for the same function, for example:
Pressing the button to calculate will multiply A * B = C.
When you turn the switch on, a screen will appear showing three more switches; when you turn it off, it will hide and/or delete the previous one. (already solved)
I will name the three switches that appear (secondary switches): mild (D), moderate (E), and severe (S). Each switched on switch will have a different value, which will have to be multiplied by the value in a text field (G) and added to the initial multiplication of A * B = C.
Turning on any mild switch will automatically turn off the moderate and severe switches, and so on for each switch. (also solved)
The question is, how do I get the mild switch (D) to multiply its value by the text field (G) when I turn on the switch? So that each switched on switch is multiplied, and the result is printed on a label (H).
(Traductor google)