float xPos = 0.f;
Scrollbar horizontalS = getElement().findNiftyControl("#nifty-internal-horizontal-scrollbar", Scrollbar.class);
if (horizontalS != null && horizontalScrollbar) {
xPos = horizontalS.getValue();
}
nifty.publishEvent(getElement().getId(), new ScrollPanelChangedEvent(scrollPanel, xPos, event.getValue()));
}
}