PDA

View Full Version : [FIXED] [2.0 rc1] problem with button setVisible(false) not work in initiallize time



Webflash
26 Jun 2009, 12:35 AM
HosMode OS Win Xp
In this case when window open 2 button is visible but second buton init is visible false
when change state in click handler visible work



publicclass BugGxt implements EntryPoint {
private Button button1;
private Button button2;

publicvoid onModuleLoad() {

Window window = new Window();
window.setSize(400, 200);
button1 = new Button("button 1", new SelectionListener<ButtonEvent>() {
@Override

publicvoid componentSelected(ButtonEvent ce) {
button1.setVisible(false);
button2.setVisible(true);
}

});
button2 = new Button("button 2", new SelectionListener<ButtonEvent>() {
@Override

publicvoid componentSelected(ButtonEvent ce) {
button1.setVisible(true);
button2.setVisible(false);
}
});
button2.setVisible(false);

window.addButton(button1);
window.addButton(button2);
window.show();
Viewport viewPort = new Viewport();
viewPort.setLayout(new FitLayout());
//viewPort.add(window);

RootPanel.get().add(viewPort);

}

}

sven
26 Jun 2009, 2:59 AM
Fixed in SVN