Announcement

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

    SectionStackSection scrollbar constructor

    Hello, I trying to change the scrollbar constructor on the SectionStackSections in my SectionStack.

    I have tried to change it via sectionStack.setScrollbarConstructor("myScrollbar"); but that doesn't work, and SectionStackSection has no setScrollbarConstructor method of its own since it is not based on canvas.

    I also tried to change it via sectionStackSection.getSectionHeader().setScrollbarConstructor("myScrollbar"); but I got an error saying "Error :Cannot change configuration property 'scrollbarConstructor' to MyScrollbar now that component has been created."

    Lastly I tried to set it in the JS of the custom SectionHeader that I am using.

    Code:
    isc.defineClass("MyScrollbar", "Scrollbar");
    		if (isc.MyScrollbar) {
    			isc.MyScrollbar.addProperties({
    				baseStyle:"myScrollbar"
    			});
    		}
    
    
    
    isc.defineClass("SidebarSectionItem", "SectionHeader");
    		if (isc.SidebarSectionItem) {
    			isc.SidebarSectionItem.addProperties({
    		    		icon: null,
    				iconSize: 0,
    				baseStyle:"sidebar-section-item",
    				titleStyle:"sidebar-section-title",
    				showRollOver: true,
    				[b]scrollbarConstructor: "MyScrollbar"[/b]
    			});
    		}
    What am I doing wrong?

    Just to be clear, I'm talking about the vertical scrollbar that scrolls the elements inside an expanded SectionStackSection.
    Last edited by Niels_EMP; 11 Nov 2014, 06:54. Reason: Changed notification type

    #2
    If a scrollbar is showing in a specific SectionStackSection, it's coming from one of the section.items, not the SectionStackSection itself, so you'd need to apply this customization to the item.

    Note that it's very unusual to try to apply a custom scrollbar to just one widget, and this suggests you might be a bit confused - if you want some feedback on this choice, please start a new thread with an explanation of how you've ended up trying to customize per-widget scrollbars.

    Comment

    Working...
    X