//------------------------------------------------------------

        public ParmTreeNode(int ParmCode, ParameterManagerClass aPM)
        {
            FPM = aPM;
            try
            {
                ModelParameterClass MP = aPM.Model_Parameter(ParmCode);
                ThisParamItem = new ModelParamItem(MP);
                SetUpItem(ThisParamItem);
            }
            catch
            {
                ModelParamItem temp = new ModelParamItem();
                temp.SetUndefined(ParmCode);
                ThisParamItem = temp;
                Name          = ThisParamItem.Fieldname;
                Text          = ThisParamItem.Label;
                ImageIndex    = SelectedImageIndex = 6;
            }
        }