Dlog-Load user pref checkbox

From Vectorlab
Jump to: navigation, search


Procedure to load the last used checkbox boolean choice from the file "SavedSettingsUser.xml", setting the chosen checkbox to it. If it fails it will set the checkbox to the specified default value. The preferences must be set beforehand using the routine "SetSavedSetting". You need the routine D_LoadUserPrefStr to be loaded first. By Orso B. Schmid


{ Orso B. Schmid ************************************************ }
{ loads last used checkbox boolean val from SavedSettingsUser/XML }
PROCEDURE D_LoadUserPrefCheck(checkBox: INTEGER; XMLcategory, XMLelem, defVal: STRING);
	BEGIN
		SetItem(checkBox, (D_LoadUserPrefStr(XMLcategory, XMLelem, defVal) = 'TRUE'));
	END;