Accessing widget value

2 messages - 75 views

Hi All,

how it's possible via code to access the value of the ftextfield or a gauge for example?

Thanks a lot

Davide

TextField tf = new TextField();

String textValue = tf.getText();

System.out.println("TextField value = " + textValue);

 

Gauge g = new Gauge();

int fpValue = g.getValue(); // Caution that this value is a fixed-point integer, you can use directly this integer @see org.kalmeo.util.MathFP

System.out.println("Gauge value = " + MathFP.toString(fpValue));