Re: question from a novice in GWT
Hello: I have a similar situation to @nyankov in that I need to have some areas in my panel remain fixed while others scroll. However, the difference is that I am doing all of the activity in a GWT application. Using a combination of posts above, I was able to get the application working so that the bottom button panels remain fixed when the window was resized or scrolled. However, I too, saw the flickering and jumping that was mentioned but couldn't determine from the previous posts if you were able to solve that issue ... In addition to a fixed bottom panel, I have a fixed top panel, too. However, that isn't working at all and I have a good feeling that my parameter for setStyleAttribute is off. My code follows ... Thanks for your help [code] import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window.ScrollEvent; import com.google.gwt.user.client.Window.ScrollHandler; import com.google.gwt.user.client.ui.AbsolutePanel; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.HasVerticalAlignment; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.ScrollPanel; import com.google.gwt.user.client.ui.TextBox; import com.google.gwt.user.client.ui.VerticalPanel; public class TestScrollBar { public static void createTestScrollBar () { RootPanel rootPanel = RootPanel.get(); //create absolute panel for project information final AbsolutePanel absolutePanel = new AbsolutePanel(); HorizontalPanel projectPanel = new HorizontalPanel(); Label projectLabel = new Label(Project Name:); TextBox projectText = new TextBox(); projectPanel.add(projectLabel); projectPanel.add(projectText); absolutePanel.add(projectPanel); absolutePanel.setSize(100%,50px); //test scrolling idea with labels VerticalPanel mainPanel = new VerticalPanel(); mainPanel.add(new Label( Scroll Test)); mainPanel.add(new Label(Scroll Test2)); mainPanel.add(new Label(Scroll Test3)); mainPanel.add(new Label(Scroll Test4)); mainPanel.add(new Label(Scroll Test5)); mainPanel.add(new Label(Scroll Test6)); mainPanel.add(new Label(Scroll Test7)); mainPanel.add(new Label(Scroll Test8)); mainPanel.add(new Label(Scroll Test9)); mainPanel.add(new Label(Scroll Test10)); mainPanel.add(new Label(Scroll Test12)); mainPanel.add(new Label(Scroll Test12)); //create scrollPanel ScrollPanel scrollPanel = new ScrollPanel(); scrollPanel.add(mainPanel); scrollPanel.setSize(100%, 100%); //create buttonPanel final AbsolutePanel cancelSavePanel = new AbsolutePanel(); Button saveButton = new Button(Save); Button cancelButton = new Button(Cancel); saveButton.setSize(100px, 25px); cancelButton.setSize(100px, 25px); cancelSavePanel.add(saveButton); cancelSavePanel.add(cancelButton); cancelSavePanel.setSize(100%,25px); //add panels to rootPanel rootPanel.add(absolutePanel); rootPanel.add(scrollPanel); rootPanel.add(cancelSavePanel, 0, Window.getClientHeight()-25 ); //window resize handler Window.addResizeHandler(new ResizeHandler() { public void onResize(ResizeEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); //DOM.setStyleAttribute(h, top, (event.getHeight ()-51)+px); DOM.setStyleAttribute(h, top, 0px); com.google.gwt.user.client.Element k = cancelSavePanel.getElement(); DOM.setStyleAttribute(k, top, (event.getHeight ()-25)+px); } }); //window scroll handler Window.addWindowScrollHandler(new ScrollHandler() { public void onWindowScroll(ScrollEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, 0px); com.google.gwt.user.client.Element k = cancelSavePanel.getElement(); DOM.setStyleAttribute(k, top, (Window.getClientHeight() +event.getScrollTop()-25)+px); } }); } } [/code] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at
Re: question from a novice in GWT
Ok but how can achieve this? On Aug 17, 4:21 pm, Chad chad...@gmail.com wrote: Well, you could still use the method I outlined by using a Frame (iFrame) and load your site in it. So, you would have a GWT shell. HTH, Chad On Aug 17, 12:42 am, nyankov nikola.yan...@gmail.com wrote: Well my page is regular HTML page, and till now doesn't use GWT. Now I want to place a toolbar in it which I want to write with GWT. On 16 Авг, 22:40, Chad chad...@gmail.com wrote: Well, you could use a VerticalPanel added to the RootPanel. Put a ScrollPanel into the VerticalPanel, then put your toolbar into the VerticalPanel. Allow the VerticalPanel to take up the full size of the browser and adjust itself on browser resizing. Set the toolbar to the height you need and set the ScrollPanel to take up the rest of the space. Put the rest of your application in the ScrollPanel. This way, your toolbar wouldn't move when scrolling the application. You could also turn off the browser scroll bars if you needed to just to make sure they never appear as you'd never want them to appear. HTH, Chad On Aug 16, 11:40 am, nyankov nikola.yan...@gmail.com wrote: sure. position: fixed but this doesn't work well enough I red about frame (iframe) simulation somehow. I looked and in gmail (there opened chat popup is fixed to window bottom right). I saw that there are several iframes - but I didn't investigate in depth. On Aug 16, 7:15 pm, tolga ozdemir tka...@gmail.com wrote: Hmm, maybe you think this before.. Have you ever tried CSS? On Aug 16, 3:58 pm, nyankov nikola.yan...@gmail.com wrote: With other words I want to do workaround of position: fixed On Aug 15, 11:01 pm, nyankov nikola.yan...@gmail.com wrote: Hello, I am wondering. What is the way to implement toolbar in browser window. I want the toolbar to be fixed on window bottom always (even on scrolling and resize). Also I want the toolbar to be just a widget. Here what I already did, but on scrolling the panal flickering package com.mycompany.project.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window.ScrollEvent; import com.google.gwt.user.client.Window.ScrollHandler; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.AbsolutePanel; public class GwtTest implements EntryPoint { public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); final AbsolutePanel absolutePanel = new AbsolutePanel(); rootPanel.add(absolutePanel, 0, 244); absolutePanel.setSize(100%, 51px); Button button1 = new Button(New button); Button button2 = new Button(New button); Button button3 = new Button(New button); absolutePanel.add(button1); absolutePanel.add(button2); absolutePanel.add(button3); com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight()-51)+px); Window.addWindowScrollHandler(new ScrollHandler() { @Override public void onWindowScroll(ScrollEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight() +event.getScrollTop()-51)+px); } }); Window.addResizeHandler(new ResizeHandler() { @Override public void onResize(ResizeEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (event.getHeight()-51)+px); } }); } } Thank you in advance- Hide quoted text - - Show quoted text -- Скриване на цитирания текст - - Показване на цитирания текст -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the
Re: question from a novice in GWT
Why not just add your toolbar and use a window resize handler to put it at the bottom of the page? Ian http://examples.roughian.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: question from a novice in GWT
@nyankov: Simple, really. Leave your current (non-GWT) site intact. Then, create a separate application (GWT) with a vertical panel containing a frame and the toolbar. Disable the window scroll bars. Add a window resize handler to keep your vertical panel sized full page (or maybe just set the vertical panel height and width to 100%). Make sure the toolbar height is set absolutely. Set the url of your frame to that of your original site (relative path should work being on the same server). The frame will have scroll bars if needed. That should do it, I think. If you don't like that idea, you could always use frame sets (yuck) and create two frames (vertically). Just put your current site in the top frame and your GWT site (toolbar) in the bottom frame. Assuming you want to change pages via the toolbar, you'd be better off with the solution above over frame set. @Ian: I think that's what the OP was doing originally, but was unhappy with the jumpiness on scrolling and resizing. On Sep 2, 5:08 am, Ian Bambury ianbamb...@gmail.com wrote: Why not just add your toolbar and use a window resize handler to put it at the bottom of the page? Ian http://examples.roughian.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: question from a novice in GWT
Well, you could still use the method I outlined by using a Frame (iFrame) and load your site in it. So, you would have a GWT shell. HTH, Chad On Aug 17, 12:42 am, nyankov nikola.yan...@gmail.com wrote: Well my page is regular HTML page, and till now doesn't use GWT. Now I want to place a toolbar in it which I want to write with GWT. On 16 Авг, 22:40, Chad chad...@gmail.com wrote: Well, you could use a VerticalPanel added to the RootPanel. Put a ScrollPanel into the VerticalPanel, then put your toolbar into the VerticalPanel. Allow the VerticalPanel to take up the full size of the browser and adjust itself on browser resizing. Set the toolbar to the height you need and set the ScrollPanel to take up the rest of the space. Put the rest of your application in the ScrollPanel. This way, your toolbar wouldn't move when scrolling the application. You could also turn off the browser scroll bars if you needed to just to make sure they never appear as you'd never want them to appear. HTH, Chad On Aug 16, 11:40 am, nyankov nikola.yan...@gmail.com wrote: sure. position: fixed but this doesn't work well enough I red about frame (iframe) simulation somehow. I looked and in gmail (there opened chat popup is fixed to window bottom right). I saw that there are several iframes - but I didn't investigate in depth. On Aug 16, 7:15 pm, tolga ozdemir tka...@gmail.com wrote: Hmm, maybe you think this before.. Have you ever tried CSS? On Aug 16, 3:58 pm, nyankov nikola.yan...@gmail.com wrote: With other words I want to do workaround of position: fixed On Aug 15, 11:01 pm, nyankov nikola.yan...@gmail.com wrote: Hello, I am wondering. What is the way to implement toolbar in browser window. I want the toolbar to be fixed on window bottom always (even on scrolling and resize). Also I want the toolbar to be just a widget. Here what I already did, but on scrolling the panal flickering package com.mycompany.project.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window.ScrollEvent; import com.google.gwt.user.client.Window.ScrollHandler; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.AbsolutePanel; public class GwtTest implements EntryPoint { public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); final AbsolutePanel absolutePanel = new AbsolutePanel(); rootPanel.add(absolutePanel, 0, 244); absolutePanel.setSize(100%, 51px); Button button1 = new Button(New button); Button button2 = new Button(New button); Button button3 = new Button(New button); absolutePanel.add(button1); absolutePanel.add(button2); absolutePanel.add(button3); com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight()-51)+px); Window.addWindowScrollHandler(new ScrollHandler() { @Override public void onWindowScroll(ScrollEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight() +event.getScrollTop()-51)+px); } }); Window.addResizeHandler(new ResizeHandler() { @Override public void onResize(ResizeEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (event.getHeight()-51)+px); } }); } } Thank you in advance- Hide quoted text - - Show quoted text -- Скриване на цитирания текст - - Показване на цитирания текст - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit
Re: question from a novice in GWT
With other words I want to do workaround of position: fixed On Aug 15, 11:01 pm, nyankov nikola.yan...@gmail.com wrote: Hello, I am wondering. What is the way to implement toolbar in browser window. I want the toolbar to be fixed on window bottom always (even on scrolling and resize). Also I want the toolbar to be just a widget. Here what I already did, but on scrolling the panal flickering package com.mycompany.project.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window.ScrollEvent; import com.google.gwt.user.client.Window.ScrollHandler; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.AbsolutePanel; public class GwtTest implements EntryPoint { public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); final AbsolutePanel absolutePanel = new AbsolutePanel(); rootPanel.add(absolutePanel, 0, 244); absolutePanel.setSize(100%, 51px); Button button1 = new Button(New button); Button button2 = new Button(New button); Button button3 = new Button(New button); absolutePanel.add(button1); absolutePanel.add(button2); absolutePanel.add(button3); com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight()-51)+px); Window.addWindowScrollHandler(new ScrollHandler() { @Override public void onWindowScroll(ScrollEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight() +event.getScrollTop()-51)+px); } }); Window.addResizeHandler(new ResizeHandler() { @Override public void onResize(ResizeEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (event.getHeight()-51)+px); } }); } } Thank you in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: question from a novice in GWT
Hmm, maybe you think this before.. Have you ever tried CSS? On Aug 16, 3:58 pm, nyankov nikola.yan...@gmail.com wrote: With other words I want to do workaround of position: fixed On Aug 15, 11:01 pm, nyankov nikola.yan...@gmail.com wrote: Hello, I am wondering. What is the way to implement toolbar in browser window. I want the toolbar to be fixed on window bottom always (even on scrolling and resize). Also I want the toolbar to be just a widget. Here what I already did, but on scrolling the panal flickering package com.mycompany.project.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window.ScrollEvent; import com.google.gwt.user.client.Window.ScrollHandler; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.AbsolutePanel; public class GwtTest implements EntryPoint { public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); final AbsolutePanel absolutePanel = new AbsolutePanel(); rootPanel.add(absolutePanel, 0, 244); absolutePanel.setSize(100%, 51px); Button button1 = new Button(New button); Button button2 = new Button(New button); Button button3 = new Button(New button); absolutePanel.add(button1); absolutePanel.add(button2); absolutePanel.add(button3); com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight()-51)+px); Window.addWindowScrollHandler(new ScrollHandler() { @Override public void onWindowScroll(ScrollEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight() +event.getScrollTop()-51)+px); } }); Window.addResizeHandler(new ResizeHandler() { @Override public void onResize(ResizeEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (event.getHeight()-51)+px); } }); } } Thank you in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: question from a novice in GWT
sure. position: fixed but this doesn't work well enough I red about frame (iframe) simulation somehow. I looked and in gmail (there opened chat popup is fixed to window bottom right). I saw that there are several iframes - but I didn't investigate in depth. On Aug 16, 7:15 pm, tolga ozdemir tka...@gmail.com wrote: Hmm, maybe you think this before.. Have you ever tried CSS? On Aug 16, 3:58 pm, nyankov nikola.yan...@gmail.com wrote: With other words I want to do workaround of position: fixed On Aug 15, 11:01 pm, nyankov nikola.yan...@gmail.com wrote: Hello, I am wondering. What is the way to implement toolbar in browser window. I want the toolbar to be fixed on window bottom always (even on scrolling and resize). Also I want the toolbar to be just a widget. Here what I already did, but on scrolling the panal flickering package com.mycompany.project.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window.ScrollEvent; import com.google.gwt.user.client.Window.ScrollHandler; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.AbsolutePanel; public class GwtTest implements EntryPoint { public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); final AbsolutePanel absolutePanel = new AbsolutePanel(); rootPanel.add(absolutePanel, 0, 244); absolutePanel.setSize(100%, 51px); Button button1 = new Button(New button); Button button2 = new Button(New button); Button button3 = new Button(New button); absolutePanel.add(button1); absolutePanel.add(button2); absolutePanel.add(button3); com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight()-51)+px); Window.addWindowScrollHandler(new ScrollHandler() { @Override public void onWindowScroll(ScrollEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight() +event.getScrollTop()-51)+px); } }); Window.addResizeHandler(new ResizeHandler() { @Override public void onResize(ResizeEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (event.getHeight()-51)+px); } }); } } Thank you in advance- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: question from a novice in GWT
Well, you could use a VerticalPanel added to the RootPanel. Put a ScrollPanel into the VerticalPanel, then put your toolbar into the VerticalPanel. Allow the VerticalPanel to take up the full size of the browser and adjust itself on browser resizing. Set the toolbar to the height you need and set the ScrollPanel to take up the rest of the space. Put the rest of your application in the ScrollPanel. This way, your toolbar wouldn't move when scrolling the application. You could also turn off the browser scroll bars if you needed to just to make sure they never appear as you'd never want them to appear. HTH, Chad On Aug 16, 11:40 am, nyankov nikola.yan...@gmail.com wrote: sure. position: fixed but this doesn't work well enough I red about frame (iframe) simulation somehow. I looked and in gmail (there opened chat popup is fixed to window bottom right). I saw that there are several iframes - but I didn't investigate in depth. On Aug 16, 7:15 pm, tolga ozdemir tka...@gmail.com wrote: Hmm, maybe you think this before.. Have you ever tried CSS? On Aug 16, 3:58 pm, nyankov nikola.yan...@gmail.com wrote: With other words I want to do workaround of position: fixed On Aug 15, 11:01 pm, nyankov nikola.yan...@gmail.com wrote: Hello, I am wondering. What is the way to implement toolbar in browser window. I want the toolbar to be fixed on window bottom always (even on scrolling and resize). Also I want the toolbar to be just a widget. Here what I already did, but on scrolling the panal flickering package com.mycompany.project.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window.ScrollEvent; import com.google.gwt.user.client.Window.ScrollHandler; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.AbsolutePanel; public class GwtTest implements EntryPoint { public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); final AbsolutePanel absolutePanel = new AbsolutePanel(); rootPanel.add(absolutePanel, 0, 244); absolutePanel.setSize(100%, 51px); Button button1 = new Button(New button); Button button2 = new Button(New button); Button button3 = new Button(New button); absolutePanel.add(button1); absolutePanel.add(button2); absolutePanel.add(button3); com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight()-51)+px); Window.addWindowScrollHandler(new ScrollHandler() { @Override public void onWindowScroll(ScrollEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight() +event.getScrollTop()-51)+px); } }); Window.addResizeHandler(new ResizeHandler() { @Override public void onResize(ResizeEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (event.getHeight()-51)+px); } }); } } Thank you in advance- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: question from a novice in GWT
Well my page is regular HTML page, and till now doesn't use GWT. Now I want to place a toolbar in it which I want to write with GWT. On 16 Авг, 22:40, Chad chad...@gmail.com wrote: Well, you could use a VerticalPanel added to the RootPanel. Put a ScrollPanel into the VerticalPanel, then put your toolbar into the VerticalPanel. Allow the VerticalPanel to take up the full size of the browser and adjust itself on browser resizing. Set the toolbar to the height you need and set the ScrollPanel to take up the rest of the space. Put the rest of your application in the ScrollPanel. This way, your toolbar wouldn't move when scrolling the application. You could also turn off the browser scroll bars if you needed to just to make sure they never appear as you'd never want them to appear. HTH, Chad On Aug 16, 11:40 am, nyankov nikola.yan...@gmail.com wrote: sure. position: fixed but this doesn't work well enough I red about frame (iframe) simulation somehow. I looked and in gmail (there opened chat popup is fixed to window bottom right). I saw that there are several iframes - but I didn't investigate in depth. On Aug 16, 7:15 pm, tolga ozdemir tka...@gmail.com wrote: Hmm, maybe you think this before.. Have you ever tried CSS? On Aug 16, 3:58 pm, nyankov nikola.yan...@gmail.com wrote: With other words I want to do workaround of position: fixed On Aug 15, 11:01 pm, nyankov nikola.yan...@gmail.com wrote: Hello, I am wondering. What is the way to implement toolbar in browser window. I want the toolbar to be fixed on window bottom always (even on scrolling and resize). Also I want the toolbar to be just a widget. Here what I already did, but on scrolling the panal flickering package com.mycompany.project.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window.ScrollEvent; import com.google.gwt.user.client.Window.ScrollHandler; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.AbsolutePanel; public class GwtTest implements EntryPoint { public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); final AbsolutePanel absolutePanel = new AbsolutePanel(); rootPanel.add(absolutePanel, 0, 244); absolutePanel.setSize(100%, 51px); Button button1 = new Button(New button); Button button2 = new Button(New button); Button button3 = new Button(New button); absolutePanel.add(button1); absolutePanel.add(button2); absolutePanel.add(button3); com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight()-51)+px); Window.addWindowScrollHandler(new ScrollHandler() { @Override public void onWindowScroll(ScrollEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight() +event.getScrollTop()-51)+px); } }); Window.addResizeHandler(new ResizeHandler() { @Override public void onResize(ResizeEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (event.getHeight()-51)+px); } }); } } Thank you in advance- Hide quoted text - - Show quoted text -- Скриване на цитирания текст - - Показване на цитирания текст - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
question from a novice in GWT
Hello, I am wondering. What is the way to implement toolbar in browser window. I want the toolbar to be fixed on window bottom always (even on scrolling and resize). Also I want the toolbar to be just a widget. Here what I already did, but on scrolling the panal flickering package com.mycompany.project.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window.ScrollEvent; import com.google.gwt.user.client.Window.ScrollHandler; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.AbsolutePanel; public class GwtTest implements EntryPoint { public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); final AbsolutePanel absolutePanel = new AbsolutePanel(); rootPanel.add(absolutePanel, 0, 244); absolutePanel.setSize(100%, 51px); Button button1 = new Button(New button); Button button2 = new Button(New button); Button button3 = new Button(New button); absolutePanel.add(button1); absolutePanel.add(button2); absolutePanel.add(button3); com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight()-51)+px); Window.addWindowScrollHandler(new ScrollHandler() { @Override public void onWindowScroll(ScrollEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight() +event.getScrollTop()-51)+px); } }); Window.addResizeHandler(new ResizeHandler() { @Override public void onResize(ResizeEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (event.getHeight()-51)+px); } }); } } Thank you in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---