Announcement

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

    Resizing Window to Max Height with scrollbars

    Hi Isomorphic,
    We have now requirement to introduce scrollbars on the modal window when height of the window is more then specified max height.(the same for the width)
    So we have unpredictable text content and if the height of this content is more then MAX HEIGHT (e.g. 500px) then we need to introduce scrollbars.
    But if it is less, then window should fit to the content inside.
    I already found out this topic https://forums.smartclient.com/forum...grow-offscreen where you said :
    "this particular behavior, of resizing to given maximums and then introducing scrollbars, is not currently a builtin feature - however, there are ways to do it."
    And I was trying to implement this solution (but on java) which you proposed there, but I was not able to change overflow from "visible" to "auto" because i got exception and according to your documentation this is a expected exception.
    ( Parameters: overflow Default value is "visible" Throws: IllegalStateException - this property cannot be changed after the component has been created )
    And if I set to "auto" from the beginning then I get always window with scrollbars.
    I prepared a testcase and this is very similar to what we have in our code. I used class from WindowModality test case. WindowModalitySample.java
    As I understand maxHeight settings are ignored so I didn't set it in my example.
    Could you please give us some advise how to achieve to show scrollbars when window has autoSize set to true.May be there is already some new built in feature, because this post what I have mentioned what written last year?

    We use SmartClient Version: v10.0p_2017-08-10/PowerEdition Deployment (built 2017-08-10)
    Browsers: Mozilla FF (26)



    #2
    We've made a change to resolve this problem in SGWT 5.1p/SC 10.1p through SGWT 4.1p/SC 9.1p - it will be in the nightly builds dated 2017-08-12 and beyond.

    The same issue was fixed long ago in SC 11.0p and newer releases - you may want to upgrade to the newest release to make sure you get the fastest access to bugfixes and new features.

    Comment


      #3
      Hi, Isomorphic.
      Thank you for good news.
      But could you please explain in more details how we can now use this feature?
      Am I right that now there will be no exception when we try to reset overflow after creating component?
      What exactly was fixed?

      Best Regards, Ksenia

      Comment


        #4
        You should now be able to call setOveflow() at any time without the IllegalStateException you reported being thrown.

        Comment

        Working...
        X