Announcement

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

    BUG? - ColumnTree cannot be styled

    As noted in this post, which has gone unanswered, we have a requirement to apply custom styling to a number of components, including the millerlist-style ColumnTree -

    http://forums.smartclient.com/showthread.php?t=13746

    After some investigation, it appears that the styling on ColumnTree is not working as advertised in the API. When I examine a ColumnTree in FireBug, it looks like the styling is hard-coded on the generated DIV - there is no stylename or classname, only a style string. And, setting attributes like backgroundColor, styleName, or stylePrimaryName on the ColumnTree have no effect.

    Is this supposed to be working, or has any user successfully customized the style of a ColumnTree, either through the Java API or CSS?

    Thanks,
    Don P.

    #2
    When the ColumnTree renders out, it is completely filled by generated columns, each of which is a ListGrid instance.

    Setting a backgroundColor, or styleName which has a backgroundColor specified in the CSS for the ColumnTree is likely to have no visible effect as the styling for the column is likely to be occluding it.

    If you modify the css styles for ListGrids, the changes will show up for column trees as well by default.

    The new setColumnProperties() API on columnTree allows you to customize the generated column listGrids, so you can customize their appearance via the standard ListGrid APIs such as setStyleName(), setBackgroundColor(), setBodyBackgroundColor(), setBodyStyleName(), setBaseStyle(), etc.

    Comment


      #3
      What this meant -

      "And, setting attributes like backgroundColor, styleName, or stylePrimaryName on the ColumnTree have no effect."

      - is not that I was trying to set these values in CSS; I was trying to use the documented API, like ColumnTree.setBackgroundColor(), ColumnTree.setStyleName(), and ColumnTree.setStylePrimaryName(), and none of these had any effect on the appearance of the ColumnTree instance. This seems like a bug to me, if the documented API is not working as documented.

      In addition, it appears that there is no access to the title header shown over the left and right panes of the ColumnTree. How do we set those styles? Is there any plan to make this all accessible via CSS?

      Currently, there is some styling done in CSS, and some via instance attributes. This is inconvenient, to have a requirement to set styling on every instance, when we want to change all instances; it is inconsistent to have some styles exposed in CSS and some not; and it is not in keeping with current and accepted practices to not put styles in CSS. Is there a plan to move all style settings to be exposed in the skin CSS files?

      Thanks,
      Don P.

      Thanks,
      Don P.

      Comment


        #4
        Looks like you still haven't read the Skinning Guide - start there first.

        On the ColumnTree, take a closer read of the previous response - we understood that you're calling APIs not setting CSS attributes, but what you've missed is that there is the ColumnTree itself and it's subelements (columns). You are skinning the wrong thing.

        Comment

        Working...
        X