Attributes Edit

defaultValue Edit

defaultValue allows you to prepopulate the preference with a value you pick.

If you specify a defaultValue for a text preference, and the user enters no text, Konfabulator will use the defaultValue. If is not your intended behaviour, do not use defaultValue for that text preference.

Possible Values: Edit

A String, compatible with the type you specified.

description Edit

The text in a description appears directly below the preference.

directory Edit

directory works with the type=selector preference. This will be the starting directory that the user can select from.

extension Edit

Used with type=selector, extension limits the file selection dialog to that extension. To specify multiple extensions, see the examples.

Example 1 Edit


Example 2 Edit

<preference group="sounds" name="alarm" title="Alarm Sound" 
  type="selector" style="open" defaultValue=""
  description="Choose a WAV, MP3, AIFF, AU, or SND file"> 

Note: notice the syntax of the XML for multiple extensions. You have to do it like this, otherwise Konfabulator will only pick the first extension you specify.

file Edit

Similar to directory, with type=selector, file specifies the starting filename.

Possible Values: Edit

any path, preferrable a valid one.

Example: Edit

group Edit

hidden Edit

kind Edit

maxLength Edit

minLength Edit

name Edit

notSaved Edit

option Edit

optionValue Edit

secure Edit

style Edit

ticks Edit

The number of ticks evenly distributed across the length of the slider. Example, <ticks>10</ticks> will show 10 ticks.

tickLabel Edit

title Edit

The preference name shown to the user. Example, "Size:", "Color:", "Default Folder:".

type Edit

Possible values: Edit

  • checkbox : returns 0 or 1 String
  • color : returns a color (#00af33) String
  • font : returns a name of a font String
  • hotkey : works with hotkey object, returns a String
  • popup : dropdown box, see option and optionValue, returns a String
  • selector : pick a file or folder, returns a String
  • slider : returns a String
  • text : returns a String

value Edit

Cookbook Edit

All preferences can use defaultValue, description, group, name, hidden, title, notSaved. But some attributes only work in special combinations, based on the type you can use:

  • Selector
    • directory
    • extension
    • file
    • kind
    • style
  • Slider
    • maxLength
    • minLength
    • ticks
    • tickLabel


<preference group="pingPrefGroup" name="pingBgOpacity">
  • Popup
    • option
    • optionValue
  • Text
    • secure