Announcement

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

    isc.Button css for background-image

    the following CSS for button does not work for me when I set the background-image


    Code:
    isc.Button.create({
        ID: "cssButton",
        baseStyle: "cssButton",
        left: 200,
        showRollOver: true,
        showDisabled: true,
        showDown: true,
        title: "CSS Button"
    });
    Code:
    .cssButton {
        padding:2px;
        font-family:Verdana,Bitstream Vera Sans,sans-serif; font-size:11px; background-color:#CCCCCC;
        color:#000000;
        border-left:1px solid white; border-top:1px solid white;
        border-right:1px solid #808080; border-bottom:1px solid #808080;
        background-image:"icons/16/find.png";
    }

    #2
    Use Firebug to see if there is a fetch for that image.

    Also, note that you'll need a style *series* for a fully functional button (cssButtonOver, cssButtonSelected, etc).

    Comment


      #3
      I am using the Button States example in the feature explorer. No css changes seem to take effect on that.

      Comment


        #4
        Not sure what effect you were hoping that would have, but try it standalone, and again, be sure to use Firebug to check whether the image is loading.

        Comment


          #5
          no worries I got it working with our application.

          On another topic, I have column in my listgrid of type "text". The data that I am trying to display is "<logged out>" but this data is only shown when the cell is on edit mode. I tried taking out the "<" and ">". and it showed up fine. Is this expected behaviour? Am I not allowed to have these characters and if so is there any way to escape them and tell the listgrid to take it as a literal?

          Comment


            #6
            The content of a cell is HTML and < and > are special in HTML. If they are legal characters for the field, you can escape the entire contents of the field each time with a formatCellValue() override and some simple Regexps. If it's intended as a special "flag" value you can just encode them manually with "&lt;logged out&gt;"

            Comment


              #7
              ok great thanks!

              Comment


                #8
                just trying to get this straight...if special characters are valid for data shown in the list grid, we would have to override the formatCellValue to escape all of them? Does smartclient have a way for the customers to not have to do all this themselves? We've tried escaping html but as soon as the cell goes into edit mode, the escape strings are there ...it is not user friendly at all.

                Comment


                  #9
                  You want to do this centrally via the SimpleType API. You write the escaping logic once, and you can just declare fields as the type you've defined.

                  Formatting logic should not normally affect how a value is display when edited - if you want more help with that, show the code that had this effect, but really moving the formatting logic to a SimpleType definition is your next step.

                  Comment

                  Working...
                  X