behavior: file-icon

behavior:file-icon is used when you need to present some file name to the user with shell icon registered in the system for the file. Here is an example of <select> elements that show list of files:

options with file icons

behavior:file-icon is using foreground-*** CSS attributes to position the icon on the element. Here is an example of <option> element styling in the example above:

      select.file-list > option
      {
        behavior:file-icon;
        padding:2px 2px 2px 20px;
        foreground-repeat: no-repeat;
        foreground-position: 2px 50%;
      }

Elements

There are no elements that use this behavior by default.

Attributes

that this behavior knows about:

  • filename - file name. The behavior will render icon of the file registered in the system.
    filename here is either absolute path of the file or extension like ”.txt”,”.cpp”, etc.
    Following values of the filename attribute are being interpreted in special way:
    • filename=”.” - generic folder icon
    • filename=”..” - generic drive icon.
    • filename=“\\” - generic computer icon.
  • icon-size=“small”|”large” - Optional, size of the icon to use. Default value - “small”.
If there is no filename attribute provided then the behavior will try to use text portion of the element as a file name.

Events

The behavior is not generating any events.

Value

N/A

h-smile/built-in-behaviors/file-icon.txt · Last modified: 2009/12/25 16:02 by andrew
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0