If you are experiencing an issue please mention the full platform your
issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windows 10
Simulator 7.3
Device Simulator Android, IOS
How do I catch the Cancel event?
Picker timePicker = new Picker();
timePicker.setUIID("TableCell");
timePicker.setType(Display.PICKER_TYPE_STRINGS);
String[] st = new String[23];
for (int a = 0; a < 23; a++) {
st[a] = String.valueOf(a + 1);
}
timePicker.setStrings(st);
timePicker.setSelectedString((String) value);
//
System.out.println("timePicker.getSelectedString() =
["+timePicker.getSelectedString()+"]");
timePicker.addActionListener((e)
-> setTableRowFromPtoHoursPerDay(row,
column, timePicker.getSelectedString())
);
return timePicker;
private void setTableRowFromPtoHoursPerDay(int row, int column, Picker
timePicker) {
System.out.println("setTableRowFromPtoHoursPerDay: row = " +
row + " column = " + column + " text = [" +
timePicker.getTime()+"]");
}
timePicker always returns Selected String.
I need to know that the Cancel Button was clicked.
Regards
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/f77b4075-ef25-471e-b418-887fb36dd1ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.