FengGUI - ScrollContainer / ScrollBar Theme

Hi all,

I'm trying to use some images for my scrollbar.



I'm not using a XMLTheme but I did create a class which extends StandardTheme and implements ITheme (of FengGUI). It's working really well except for the scrollBar :frowning:



It seems that the scrollBar disappeared! (see code below - I did exactly the same thing for a slider and it works?!)



Here is the methods:



public void setUp(ScrollBar sb) {

sb.getSlider().getAppearance().add(Slider.STATE_DEFAULT.toString(), new PixmapBackground(new Pixmap(texture_scrollLine), true));

sb.getSlider().getAppearance().add(Slider.STATE_FOCUSED.toString(), new PixmapBackground(new Pixmap(texture_scrollLine), true));

sb.getSlider().getAppearance().add(Slider.STATE_HOVERED.toString(), new PixmapBackground(new Pixmap(texture_scrollLine), true));

sb.getSlider().getAppearance().add(Slider.STATE_NONHOVERED.toString(), new PixmapBackground(new Pixmap(texture_scrollLine), true));

sb.getSlider().getAppearance().add(Slider.STATE_UNFOCUSED.toString(), new PixmapBackground(new Pixmap(texture_scrollLine), true));



// --> Slider Button

sb.getSlider().getSliderButton().getAppearance().removeAll();

    sb.getSlider().getSliderButton().getAppearance().setBorder(Spacing.ZERO_SPACING);

    sb.getSlider().getSliderButton().getAppearance().setMargin(Spacing.ZERO_SPACING);

    sb.getSlider().getSliderButton().getAppearance().setPadding(Spacing.ZERO_SPACING);

   

    //sb.getSlider().getSliderButton().getAppearance().addForeground(new PixmapBackground(new Pixmap(texture_scrollBody)));

    sb.getSlider().getSliderButton().setPixmap(new Pixmap(texture_scrollBody));

   

    sb.layout();

}



public void setUp(ScrollContainer sc) {

// Define the spacing of this widget

sc.getAppearance().setBorder(Spacing.ZERO_SPACING);

sc.getAppearance().setMargin(Spacing.ZERO_SPACING);

sc.getAppearance().setPadding(Spacing.ZERO_SPACING);



// Set up the scrollBar

    setUp(sc.getHorizontalScrollBar());

    setUp(sc.getVerticalScrollBar());

   

    sc.layout();

}



Thanks for your help.



Caroline.

The fenggui forum might be the better place for such questions.

Fenggui us not very widely used with jme.



And marc the fenggui maintainer is usually pretty quick to give answers or hints.

http://www.fenggui.org/forum/index.php

I wrote a post on fengGUI forum: http://www.fenggui.org/forum/index.php?topic=626.0