Adding support for disable modification of mandatory parameters in ProjectDialog
authorlaurent
Thu, 10 Dec 2009 12:26:06 +0100
changeset 482 4edbbab206a3
parent 481 593068548dca
child 483 779a519f78f2
Adding support for disable modification of mandatory parameters in ProjectDialog
PLCOpenEditor.py
--- a/PLCOpenEditor.py	Thu Dec 10 09:33:34 2009 +0100
+++ b/PLCOpenEditor.py	Thu Dec 10 12:26:06 2009 +0100
@@ -3010,9 +3010,14 @@
         
         self._init_sizers()
 
-    def __init__(self, parent):
+    def __init__(self, parent, enable_required=True):
         self._init_ctrls(parent)
         
+        self.ProjectName.Enable(enable_required)
+        self.ProductName.Enable(enable_required)
+        self.ProductVersion.Enable(enable_required)
+        self.CompanyName.Enable(enable_required)
+            
         languages = ["", "en-US", "fr-FR", "zh-CN"]
         
         for language in languages: