Announcement

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

    Stop setShowResizeBar collapse

    SmartGWT 2.5

    when using setShowResizeBar(true); is there a way to stop a click from collapsing the panel?

    I do not want collapse behavior.

    I see there is a setCanCollapse(boolean) in Splitbar, but the toolkit is creating the splitbar and I can't get at it.

    #2
    I am also interested in this. Is there a way to resize without allowing collapse?

    Comment


      #3
      We don't recommend turning this off unless you've actually got *end users* telling you they want to lose the feature (won't happen). We often see people trying to break this feature simply because it's not in the design, which is really just because the designer didn't think of it, not because they wanted to remove the feature.

      That said, you can use layout.resizeBarClass to configure the Layout to use a subclass of SplitBar where you have turned off canCollapse. Note this would be a *SmartClient* subclass of SplitBar - see the Skinning Guide for how to create such a subclass via JSNI.

      Comment


        #4
        Disabling canCollapse implementation question

        I very definitely need to disable the collapse functionality on my Splitbar (despite what I *should* do ;)

        I have implemented as follows:
        Code:
        ClassFactory.defineClass("NoCollapseSplitbar", "Splitbar");
        NoCollapseSplitbar.addProperties({
            canCollapse: false
        });
        instantiated as follows:
        Code:
        x = isc.HStack.create({
            resizeBarSize: 12,
            resizeBarClass: "NoCollapseSplitbar",
            ...
        });

        This does produce a splitbar with the required functionality (does not collapse), but the rendering images are broken, such that I get only a skeleton outline with html "broken image" icons.

        This seems very straightforward - what am I doing wrong? Thanks in advance for your help!

        SmartClient 8.2 Pro
        EnterpriseBlue skin
        Chrome, Firefox, IE tested

        Comment


          #5
          The media paths for a Splitbar include the collapsed or non-collapsed state by default. Use Firebug to see what images are being requested now that the control doesn't have such a state - you can then copy whichever media you want (collapsed or non-collapsed) to the new location.

          Comment


            #6
            That put me on the right track...
            Actually I needed to subclass "Snapbar" instead of "Splitbar" - doh!
            Thanks for your help!

            Comment

            Working...
            X