Problem inheriting form
-
Hello all. I'm having a problem letting one form inherit another. I have a simple wizard implementing the base functionality and then I have a couple of wizards that inherit from the base wizard, where I add the necessary textboxes, comboboxes and so on. I saw it called "Visual inheritance" at one place... At first it worked relatively well but now it is all a mess. My problem is this: if I add for example a textbox to an inherited form in the designer and I change a couple of properties on the textbox (AllowReturn set MultiLine to true, set some default text e.t.c.), I save the form (usually goes well) and then I compile and suddenly the textbox looses all the properties I have set -except for the ID, and moves up to the upper left corner of the form!?! Or I don't compile but I add an eventhandler for some other control, goes into the code and then returns to the designer and KABOOM! The textbox is in the upper left corner without the properties I gave it! What have I missed? I had minor problems before, that the controls occasionally lost the properties overriding the basewizard properties, but not like this. I don't know if it is related but it seems that since I moved to WinXP servicepack 2 about a week ago, it has stopped working alltogether. Any ideas? Getting a bit desperate as my project is due soon! Thanks /EnkelIk
-
Hello all. I'm having a problem letting one form inherit another. I have a simple wizard implementing the base functionality and then I have a couple of wizards that inherit from the base wizard, where I add the necessary textboxes, comboboxes and so on. I saw it called "Visual inheritance" at one place... At first it worked relatively well but now it is all a mess. My problem is this: if I add for example a textbox to an inherited form in the designer and I change a couple of properties on the textbox (AllowReturn set MultiLine to true, set some default text e.t.c.), I save the form (usually goes well) and then I compile and suddenly the textbox looses all the properties I have set -except for the ID, and moves up to the upper left corner of the form!?! Or I don't compile but I add an eventhandler for some other control, goes into the code and then returns to the designer and KABOOM! The textbox is in the upper left corner without the properties I gave it! What have I missed? I had minor problems before, that the controls occasionally lost the properties overriding the basewizard properties, but not like this. I don't know if it is related but it seems that since I moved to WinXP servicepack 2 about a week ago, it has stopped working alltogether. Any ideas? Getting a bit desperate as my project is due soon! Thanks /EnkelIk
hi, This may not the reason but still you can check the Modifiers property of the object's that you are trying to access. Change it to public. Cause you are changing the values after inheriting the object. Change the property Modifiers and set value true.:) ************************** S r e e j i t h N a i r **************************
-
hi, This may not the reason but still you can check the Modifiers property of the object's that you are trying to access. Change it to public. Cause you are changing the values after inheriting the object. Change the property Modifiers and set value true.:) ************************** S r e e j i t h N a i r **************************
Thanks! That may very well be a solution to some of my problems; I'll try that. I restarted my computer and that helped on the most frustrating thing (the textbox now keeps it's size even after saving and compiling the project), so maybe I just really need to reinstall my computer, but hopefully your tip can solve the other properties being lost (which I have had since I started with the inherited forms). Thanks /EnkelIk