rahul sanghi
unread,Apr 16, 2011, 3:10:06 PM4/16/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit, dhiraj....@gmail.com
I am trying to develop a HTML5 based player. Wanted to know how we can
add the Slider bar to a Panel and add this Panel to the RootPanel
instead of adding it directly to the RootPanel.
The SliderBar doesnt work/render properly when i try to do the former,
but works perfectly when i try to add it directly to the RootPanel.
I am using Firefox browser. Please let me know any workaround, or if i
am missing out on something!
Here's my code snippet:
SliderBar slider = new SliderBar(0.0, 100);
slider.setStepSize(10);
slider.setCurrentValue(5);
slider.setNumTicks(10);
slider.setNumLabels(10);
slider.setWidth("100%");
slider.redraw();
//TODO Create playButton, stopButton, timeLabel,
fullSreenButton
//TODO Assemble playStopPanel. horizontal
playControlPanel.add(playPauseButton);
playControlPanel.add(stopButton);
playControlPanel.add(volumeButton);
playControlPanel.add(timeLabel);
playControlPanel.add(fullScreenButton);
//playControlPanel.add(progressBar);
playControlPanel.setWidth("100%");
playControlPanel.add(slider);
// TODO Assemble Main panel.
mainPanel.add(playControlPanel);
// TODO Associate the Main panel with the HTML host page.
RootPanel.get("playerPanel").add(mainPanel);//doesnt render
properly
RootPanel.get("playerPanel").add(slider);//works fine
Thanks!
Rahul