FANDOM


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

<preference>
  <type>selector</type>
  <style>open</style>
  <extension>.txt</extension>
  <extension>.nfo</extension>
  <extension>.csv</extension>
</preference>

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"> 
  <extension>.wav</extension>
  <extension>.mp3</extension>
  <extension>.aiff</extension>
  <extension>.au</extension>
  <extension>.snd</extension>
</preference>

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

Example:

<preference group="pingPrefGroup" name="pingBgOpacity">
  <title>Transparency</title>
  <defaultValue>255</defaultValue>
  <type>slider</type>
  <minLength>0</minLength><maxLength>255</maxLength>
  <ticks>15</ticks>
  <tickLabel>0%</tickLabel><tickLabel>Opacity</tickLabel><tickLabel>100%</tickLabel>
</preference>
  • Popup
    • option
    • optionValue
  • Text
    • secure

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.