behavior: path-select

File or folder paths selectors.

Elements

that have this behavior applied by default:

  • <input type=“file-path” /> - inline single line
  • <widget type=“file-path”></widget>
  • <input type=“folder-path” /> - inline single line
  • <widget type=“folder-path”></widget>

Attributes

that this behavior knows about:

  • filter=“filename-filter” - (type=“file-path” only) defines list of file name filters. filename-filter is list of filter groups separated by semicolon ';' where each group contains filter name, ':' and comma separated list of file masks. Sample:
    <input type="file-path" 
           filter="HTML files:*.htm,*.html;Text files:*.txt;All files:*.*" 
           novalue="(select file)"/>
  • novalue=“text” - if file was not selected (the input is empty) then it shows text provided by the novalue attribute. You can style this state by using :empty CSS selector.

Events

Additionally to the standard set of events (mouse, keyboard, focus) behavior: file generates:

  • BUTTON_STATE_CHANGED event - value of the element was changed due to user actions. Posted (asynchronous) event.

Value

type json::value::V_STRING, reports filename selected.

The value is read/write by code.

h-smile/built-in-behaviors/file-selector.txt · Last modified: 2010/08/05 12:25 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