Go Back   SmartClient Forums > Smart GWT Technical Q&A
Wiki Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 2nd Feb 2010, 05:31
ccocco ccocco is offline
Registered Developer
 
Join Date: Feb 2010
Posts: 45
Default 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...
                    }
                }
            }
        });
    }
Reply With Quote
  #2  
Old 2nd Feb 2010, 09:45
Isomorphic Isomorphic is offline
Administrator
 
Join Date: May 2006
Posts: 30,561
Default

There was a problem afflicting skins that use image-based SectionHeaders. Fixed in SmartClient, will hit SVN in a few days.
Reply With Quote
  #3  
Old 3rd Feb 2010, 02:34
ccocco ccocco is offline
Registered Developer
 
Join Date: Feb 2010
Posts: 45
Default 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!
Reply With Quote
  #4  
Old 3rd Feb 2010, 22:57
levi levi is offline
Registered Developer
 
Join Date: Apr 2009
Posts: 468
Default

Quote:
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/
Reply With Quote
  #5  
Old 4th Feb 2010, 10:03
ccocco ccocco is offline
Registered Developer
 
Join Date: Feb 2010
Posts: 45
Default

Thanks a lot! That helps...
Reply With Quote
  #6  
Old 8th Feb 2010, 10:51
ccocco ccocco is offline
Registered Developer
 
Join Date: Feb 2010
Posts: 45
Default Is This Available Yet?

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search


© 2010,2011 Isomorphic Software. All Rights Reserved