Dlog-Load user pref pulldown by index

From Vectorlab
Jump to: navigation, search


Function to load the last used pulldown menu choice by index from the file "SavedSettingsUser.xml", it sets the chosen pulldown menu to the choice, if it fails it will set the pulldown menu to the first choice (0). The preferences must be set beforehand using the routine "SetSavedSetting" or using the subroutine D_StoreUserPrefPull. You need the routine D_LoadUserPrefNum to be loaded first. By Orso B. Schmid


{ Orso B. Schmid ************************************************ }
{ loads last used pull choice from SavedSettingsUser/XML }
PROCEDURE D_LoadUserPrefPull(pull_ID: LONGINT; XMLcategory, XMLelem: STRING);
	VAR
		temp_i : INTEGER;
	BEGIN
		temp_i := D_LoadUserPrefNum(XMLcategory, XMLelem, 0);
		SelChoice(pull_ID, temp_i, TRUE);
	END;