6 Replies Latest reply on Feb 23, 2009 8:34 PM by jbucaran

    Custom component and programmatic skin

      Hello folks,

      I am developing a custom set of "lite" components both for testing, learning and making way for something bigger. My humble library will include among others a simple LiteButton.

      However I can't get the programmatic skin to work for my LiteButton,

      Currently there are 3 files:

      LiteButton.as: extends the UIComponent and simple calls super.<method> for each method I am overriding (createControls, measure, updateDisplayList).

      LiteButtonSkin.as: extends ProgrammaticSkin and currently is not checking for any states but simple drawing a rectangle inside updateDisplayList.

      theme.css: a stylesheet that uses ClassReference to skin the LiteButton component.
      LiteButton { skin: ClassReference('com.atomflux.skins.plume.LiteButtonSkin'); }


      Note that in LiteButton.as inside the package declaration I am also doing this:

      include "../skins/theme.css"
      [Style(name="skin", type="Class", inherit="no", states="up, over, down, disabled, selectedUp, selectedOver, selectedDown, selectedDisabled")]