PreferenceKeyName()

Syntax

Key$ = PreferenceKeyName()
Description
Returns the name of the current key being enumerated with ExaminePreferenceKeys(). To get the value of the key, use PreferenceKeyValue().

Parameters

None.

Return value

The name of the current key being enumerated with ExaminePreferenceKeys().

Example

  ; Open a preference file
  OpenPreferences(#PB_Compiler_Home +"Examples\Sources\Data\test.pref")
  
  ; Select a group
  PreferenceGroup("Window")
  
  ; Examine keys in the group 'Window'
  ExaminePreferenceKeys()
  While  NextPreferenceKey() ; While a key exists
    MessageRequester("Key group 'Window'", PreferenceKeyName() + " = " + PreferenceKeyValue())  ; Display the key with its data
  Wend
  
  ; Close the preference file
  ClosePreferences()  

See Also

ExaminePreferenceKeys(), PreferenceKeyValue()

Supported OS

All

<- PreferenceGroupName() - Preference Index - PreferenceKeyValue() ->