leftListBox.addItem("Item2");
leftListBox.addItem("Item3");
leftListBox.addItem("Item4");
leftListBox.addItem("Item5");
leftListBox.setVisibleItemCount(10);
leftListBox.addChangeHandler(new PChangeHandler() {
@Override
public void onChange(final PChangeEvent event) {
PNotificationManager.showTrayNotification("Item selected : " + leftListBox.getSelectedItem());
}
});
final PListBox rightListBox = twinListBox.getRightListBox();
rightListBox.addItem("Item6");
rightListBox.addItem("Item7");
rightListBox.addItem("Item8");
rightListBox.addItem("Item9");
rightListBox.setVisibleItemCount(10);
rightListBox.addChangeHandler(new PChangeHandler() {
@Override
public void onChange(final PChangeEvent event) {
PNotificationManager.showTrayNotification("Item selected : " + rightListBox.getSelectedItem());
}
});
twinListBox.addChangeHandler(new PChangeHandler() {
@Override
public void onChange(final PChangeEvent event) {
PNotificationManager.showTrayNotification("Item changed");
}