Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ofcgwt resize

    i want my ofcgwt chart to resize whenever i maximise my window.

    i was told that i should use fitlayout for gwtext.

    may i know what class should i use for smartgwt??

    #2
    Try

    WidgetCanvas ofcCanvas = new WidgetCanvas(ofcWidget);
    ofcCanvas.setWidth100();
    ofcCanvas.setHeight100();

    and add this ofcCanvas to the parent layout / container as usual.

    Sanjiv

    PS: Please do not cross post especially within a day of your initial post.

    Comment


      #3
      Thanks a lot

      Thanks a lot for this tip.

      Although I do not catch why, it solved my problem of invisible chart.

      I tried to apply a style giving it a HUUUGE Z-index, it did not work.


      Cheers


      JBat

      Comment


        #4
        How did this exactly solved the problem for you ? I did exactly the same and the problem remains: whenever I resize the window, the chart disappears.

        It's the same kind of problem I have with Google Maps. Perhaps because both are GWT widgets ?

        Best regards,
        Juan

        Comment


          #5
          Update

          If you add resize bars the chart is NOT resized, they just move it but it doesn't disappear. If you resize the window, it just disappears.

          Simple source attached.

          Best regards,
          Attached Files
          Last edited by juan.medin; 14 Apr 2009, 06:03.

          Comment


            #6
            Update II

            It seems that the WidgetCanvas doesn't play nicely with the resize events.

            If you set two resize bars (one vertical and one horizontal as in the example in the code above) and you resize it with the horizontal scrollbar, the widget is not resized, only moved to the new position. If you use the vertical scrollbar the widget is resized vertically but not horizontally *and* it's correctly positioned on the screen.

            Comment


              #7
              Update III

              I was testing it with Safari on Mac. If I use Firefox it just doesn't shows the chart. Nothing. Nada. It seems that at least a part of this is browser related.

              Tested on a Windows machine with Chrome the chart stays in the window. So it seems to be a Mac browser problem after all ?

              jbat, what browser were you using ?
              Last edited by juan.medin; 14 Apr 2009, 09:24.

              Comment


                #8
                Hi,

                I am using ofcgwt and smartGWT in my application.

                I used the code provided by Juan.

                In order to see the chart and display it correctly, I am creating a widgetCanvas and adding the chart as a child of the widgetCanvas.

                My widgetCanvas is in a FormLayout.

                When I add the widgetCanvas to the FormLayout, the title of the screen is changed to "MyApplication"+"#charts" where charts is the token used in the history.

                Any idea on why this is happening and how can I remove it and keep the name of my application?

                Thank you

                Comment

                Working...
                X