Announcement

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

    Is it a limitation or am I not using right settings for Window resize.

    I created a resizable dialog and I am able to resize it only from right and bottom sides, but I could not from left and top.
    I am not concerned about the top as the mouse over shows the cross arrows to move the dialog.
    I tried it on the Auto Size sample on SmartGWT showcase, got the same results.
    http://www.smartclient.com/smartgwt/showcase/#layout_windows_autosize

    Thanks in advance for the clarifications.

    #2
    Use Canvas.setResizeFrom(..)

    The javadocs need to be updated but there is the usage

    Allows resizing in certain edges or corners. The default value of null indicates that the widget is resizable from any corner or edge. To restrict resizing to only certain corners, set resizeFrom to an array of any of the values listed:
    T top edge
    B bottom edge
    L left edge
    R right edge
    TL top-left corner
    TR top-right corner
    BL bottom-left corner
    BR bottom-right corner
    E.g. setting this property to a value of new ["R","TR","BR"] would restrict resizing to the right edge, top-right corner and bottom-right corner only
    See this sample.

    Comment


      #3
      Thank you very much for the quick reply.

      Thanks a lot I will try that.

      Comment


        #4
        Yes, if the Documentation on com.smartgwt.client.widgets.Canvas.setResizeFrom(EdgeName...) could be updated

        The default of null indicates the widget can be resized from any corner or edge
        or the implementation, as not specifying it makes Windows resizeable from R, B, RB only.


        Fixed for us by adding resizeFrom in load_skin.js
        Code:
        isc.Window.addProperties(
        ...
           resizeFrom: ["T", "B", "L", "R", "TL", "TR", "BL", "BR"]
        )

        Comment


          #5
          No updates are necessary. The docs are correct about the Canvas-level default setting, and the default setting is just different on Window.

          Your change is fine if you want resizing from every edge and corner.

          Comment

          Working...
          X