Announcement

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

    SectionStack.setShowExpandControls() Doesn't Work

    I need to hide the expand/collapse icon displayed in the header of SectionStackSections added to a SectionStack. I'm calling SectionStack.setShowExpandControls(Boolean.FALSE) but they still appear. I cannot call SectionStackSection.setCanCollapse(Boolean.FALSE) on the individual SectionStackSections because it prevents mouse clicks on their headers from being fired and thus detected in a corresponding SectionHeaderClickHandler. Is there a bug in this API or am I interpreting its' usage incorrectly. If so, is there another way to hide these icons? Thanks.

    Code Snippet:
    Code:
        protected Layout createMainCanvas()
        {
            Layout mainLayout = new HLayout();
            mainLayout.setWidth("100%");
            mainLayout.setHeight("*");
            
            Layout navigatorLayout = new VLayout();
            navigatorLayout.setWidth("20%");
            navigatorLayout.setShowResizeBar(true);
    
            mainLayout.addMember(navigatorLayout);
    
            SectionStack navigatorStack = new SectionStack();
            navigatorStack.setVisibilityMode(VisibilityMode.MUTEX);
            navigatorStack.setShowExpandControls(Boolean.FALSE);
            navigatorStack.setWidth("100%");
            navigatorStack.setHeight("180px");
    
            navigatorLayout.addMember(navigatorStack);
    
            String imgHTML = Canvas.imgHTML("analytic.png");
            String title = "<span>" + imgHTML + "&nbsp;Analytics</span>";
            final SectionStackSection analyticsSection = new SectionStackSection(title);
            navigatorStack.addSection(analyticsSection);
    
            navigatorStack.addSectionHeaderClickHandler(new SectionHeaderClickHandler()
            {
                @Override
                public void onSectionHeaderClick(SectionHeaderClickEvent event)
                {
                    if (event != null)
                    {
                        event.cancel();
    
                        if (event.getSection() == analyticsSection)
                        {
                            // Process click...
                        }
                    }
                }
            });
        }

    #2
    There was a problem afflicting skins that use image-based SectionHeaders. Fixed in SmartClient, will hit SVN in a few days.

    Comment


      #3
      Available Fix

      I'm new to this site so I'm not sure how you normally propagate changes like this. Will you send out another post? Thanks for fixing this!

      Comment


        #4
        Originally posted by ccocco
        I'm new to this site so I'm not sure how you normally propagate changes like this. Will you send out another post? Thanks for fixing this!
        If you know the how-to's you can get the classes from the trunk project, add them to your project and put them at the top of your classpath.

        Or a bit easier is getting a nightly build here: http://www.smartclient.com/smartgwt/builds/

        Comment


          #5
          Thanks a lot! That helps...

          Comment


            #6
            Is This Available Yet?

            I got the latest build today but I still see the issue. Has the fix been released yet? Thanks!

            Comment

            Working...
            X