Announcement

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

    Custom styling of SmartGWT components - ColumnTree

    I have a requirement to provide custom L&F on components, and am having difficulties locating the CSS styles applied to the components.

    I know where the skin_style.css file is located and used, but some components don't seem to have their styles sourced from here. Specifically, I need to change the styling of the ColumnTree widget -
    - Change the Header background and font colors.
    - Change the record row background and font colors.

    Currently, for example, the record rows use alternating blue and white background colors. I searched in the instance APIs for ColumnTree, and I see nothing for style listed.

    I also need to change the styling of the FacetChart widget. For this, I see a method:

    /**
    * Default styleName for the chart.
    *
    * @param styleName styleName Default value is "scChart"
    */
    public void setStyleName(String styleName) {
    setAttribute("styleName", styleName, true);
    }

    However, I do not see any named style in the theme CSS like this. I would also expect to see more style settings, for things like the header, the alternating colors, etc.

    Can some guidance be provided on these specific widgets, and in general, for how to completely customize the styling based on the default styling?

    Thanks,
    Don P.

    #2
    We've just added SmartGWT APIs to the ColumnTree class to support customizing the appearance of individual columns.
    Look for setColumnProperties() [and getCustomColumnProperties(TreeNode node, int colNum)] in the next nightly build

    Comment


      #3
      Paul,

      How about my more general question -

      How to apply styling to all widgets in general via CSS, rather than widget instances?

      And, how to apply styling to FacetChart? Like the chart background, axis fonts and font colors, etc. We are using the chart on a black background, and it is quite illegible, and there appears to be absolutely no support for changing any aspect of the chart styling.

      Thanks,
      Don P.

      Comment


        #4
        Originally posted by Isomorphic_Paul
        We've just added SmartGWT APIs to the ColumnTree class to support customizing the appearance of individual columns.
        Look for setColumnProperties() [and getCustomColumnProperties(TreeNode node, int colNum)] in the next nightly build
        I have tried overriding this method to provide custom ListGrid column ( I want nonfixed row with wrapped text). It works, starting from second column.

        But for the first column(colNum=0), the customColumnProperties I provide seems to be unused. Any ideas on how I should customize this first column?

        Comment

        Working...
        X