Announcement

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

    Can i set FormIcon size via CSS?

    Please consider the following class:

    [code]
    public class HelpFormIcon extends FormItemIcon {

    public HelpFormIcon() {
    setNeverDisable(true);
    setName("help");
    setSrc(WebConstants.QUESTION_FORM_IMG);
    //setWidth(20);
    //setHeight(20);
    setBaseStyle("helpIcon");
    }
    }
    [code]

    I wanted to define the size of this formicon outside of java code. I tried setBaseStyle and define the size in css and that set the class of the img, however widht/height is 18 which i guess is skin default.

    Can i do this via CSS somehow or do i have to define a class in load_skin?

    #2
    The size must either be set in Java or in load_skin.js, but if this is somehow inconvenient and you want something smaller, you can always use a smaller image with blank space.

    Comment


      #3
      No it's not a big deal, we're just looking into moving as much as possible of the gui-config out of java and into properties (css perferrable, load_skin ok :) ) Our old code is not very disciplined in that regard and we're trying to improve while we're rewriting.

      Comment


        #4
        Hey, little follow-up here. I spent a little while seeing how i would specify the size of my class outside java, and i can't figure it out...

        The FormItemIcon inherits from DataClass, so there's no 'setScClassName' that i've used in the past to add stuff to load_skin. There's no mention of FormItemIcon at all in load_skin or anywhere else that i can find, so i'm not sure how i would add this to load_skin actually?

        Comment


          #5
          See FormItem.iconWidth/iconHeight.

          Comment

          Working...
          X