Check the Layout Panels, those are new in GWT and make the work to layout your app much easier.
Your answer maybe in the use of DockLayoutPanel / SplitLayoutPanel. http://code.google.com/intl/webtoolkit/webtoolkit/doc/latest/DevGuideUiPanels.html Hope it helps. On 19 jun, 15:38, spierce7 <[email protected]> wrote: > Hey, I'm trying to make a program that is very similar to Google > Calendar. One of the things I'm currently trying to implement, is I > want the top line in the grid to maintain stationary, while the rest > of the calendar is scrollable (this way the dates over the columns are > always visible. So I broke the first row of the calendar off into it's > own Object called weeklyHeader, and set it to the same style so that > it would match, but now since it's apart I have to have it resize, and > the way I've currently figured out how to do that, I'm not very happy > with, as it's laggy. I've also noticed that now since I've added the > resize handler, the entire browser lags when I resize it (Make the > browser window small, and play around with it and you'll see what I'm > talking about). What else can I do to fix this? > > My second issue that I'm dealing with is I'm trying to add a scroll > panel to the actual calendar part, however the only way I've gotten > this to work is through setting an actual pixel height rather than a > percent, and I think I need it to be a percent. I can't have it as a > percent though because their is one other widget that takes up 19 > pixels above it. What can I do to make the scroll panel have dynamic > height in terms of browser height? > > Here is a link to my program so you can see what I am talking > about:http://internetexample.appspot.com/ > > Here is my EntryPoint code so you can understand how I have things > currently set up: > public class Scheduler implements EntryPoint { > public boolean timerSet = false; > > public void onModuleLoad() { > VerticalPanel verticalPanel = new VerticalPanel(); > final WeeklyHeader weeklyHeader = new WeeklyHeader(); > ScrollPanel scrollPanel = new ScrollPanel(); > WeeklyAbsolutePanel weeklyPanel = new WeeklyAbsolutePanel(); > final WeeklyGrid weeklyGrid = new WeeklyGrid(weeklyHeader, > weeklyPanel); > > weeklyHeader.setWeeklyGrid(weeklyGrid); > > verticalPanel.setWidth("100%"); > verticalPanel.setStyleName("verticalPanel"); > verticalPanel.setSpacing(0); > scrollPanel.setHeight("800px"); > > weeklyPanel.add(weeklyGrid); > scrollPanel.add(weeklyPanel); > verticalPanel.add(weeklyHeader); > verticalPanel.add(scrollPanel); > RootPanel.get().add(verticalPanel); > > final Timer resizeTimer = new Timer() { > @Override > public void run() { > weeklyHeader.onLoad(); //this calls a an > overridden onLoad() where > I have the super.onLoad() called and > setWidth(weeklyGrid.getOffsetWidth() + "px"); > timerSet = false; > } > }; > > // Handle window Resizing > Window.addResizeHandler(new ResizeHandler() { > public void onResize(ResizeEvent event) { > if(!timerSet){ > resizeTimer.schedule(50); > timerSet = true; > } > } > }); > } > > } > > ANY help would be greatly appreciated. I'm a GWT newb pretty much > trying to figure things out as I go along, so please don't assume I > may have done something I should have. Thanks! -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
