RemovePreferenceGroup()

Syntax

RemovePreferenceGroup(Group$)
Description
Removes the specified 'Group$' and all its keys.

Parameters

Group$ The group name to remove.

Return value

None.

Example

  ; Create the preference file prefs.txt
  If CreatePreferences(GetTemporaryDirectory()+"Prefs.txt", #PB_Preference_GroupSeparator)

    PreferenceGroup("Window")
      WritePreferenceLong ("X", 100)
      WritePreferenceLong ("Y", 125)
      WritePreferenceString("Title", "PureNote")
      
      PreferenceGroup("event")
      WritePreferenceString("percentage", "percentage")
      WritePreferenceFloat("%", 100)
      
      ClosePreferences()
    
      RunProgram(GetTemporaryDirectory()+"Prefs.txt")
    EndIf  
    
    MessageRequester("Info", "Delete the group 'event' ")
    
  ; Open a preference file
    OpenPreferences(GetTemporaryDirectory()+"Prefs.txt")
    
  ; Delete the group 'event'  
    RemovePreferenceGroup("event")
    
    ClosePreferences()
      
    RunProgram(GetTemporaryDirectory()+"Prefs.txt")

See Also

PreferenceGroup(), ExaminePreferenceGroups()

Supported OS

All

<- ReadPreferenceString() - Preference Index - RemovePreferenceKey() ->