Announcement

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

    TreeGrid icon disabled.

    Now, if the TreeGrid component has the disabled=true state, then the icons remain in the normal status. (I mean the icon style) Is there any way to make the icons adopt the Disabled status style?

    #2
    When you say "Now", are you claiming this is a new behavior, that something has changed?

    Either way - you didn't show your framework version or browser, or indicate where you see this - in your app or somewhere in the Showcase?

    Comment


      #3
      By writing "now" I mean the current version of SmartClient. My version is v13.1p_2026-07-10/ Pro Deployment.

      I can see this in my application, and I haven't found anything in the documentation (for version 14.1) on how to force the icon to accept the style or source for the disabled state. There is a showCustomIconSelected property for the selected state, but there is nothing like this for the disabled state.

      Comment


        #4
        Those icons don't currently have disabled-state handling - SVG symbols work, because they respond to color-change, but there's no support for appending _disabled to png icons, for example.

        You could do something with pure CSS if you want:

        Code:
        var ssh = isc.StyleSheetHandler.create({
            autoLoad: true,
            cssText: `
                /* treeCellDisabled is the default class */
                .treeCellDisabled img,
                .treeCellDisabled span,
                .treeCellDisabled .treeCellIcon { /* icon sprite/img inside a disabled tree cell */
                    opacity: 0.4;
                    filter: grayscale(100%);
                }
        
                /* SVG stock icons wrap an inner <span>; stop opacity/grayscale compounding on it */
                .treeCellDisabled span[issvgsprite="true"] > span {
                    opacity: 1;
                    filter: none;
                }
            `
        });
        Last edited by Isomorphic; 13 Jul 2026, 01:39.

        Comment


          #5
          Thank you very much.

          Comment


            #6
            It's working
            Last edited by Hirn; 13 Jul 2026, 05:41.

            Comment

            Working...
            X