Thanks Frank. That's a clean and acceptable solution since you don't have to deal with many controls on many derived forms. I simplified the example to make it clear but if i do that in my real case, i will multiply the depth of inheritance and the forms without a functional purpose.
sixadOne
Posts
-
Hide control inherited from a base form in a specific derived form, this at design-time ! -
DataSet HasChanges doesn't pick up changes made by bound TextBoxesDon't know if it works, but maybe you can fire the load/enter event of each tabpages when the form is loading. All bindings should have been done after that. Or you can have a boolean for each tabpages that determines if it's the firs load or not. Not very good solutions. It's a shame you can't use events related to your datasource.
-
Hide control inherited from a base form in a specific derived form, this at design-time !Thanks for your reply. Actually I have 8 derived forms which use 15+ identical controls. But for 1 of these derived forms, 4 controls have to be replaced. What you suggest, tell me if i'm wrong, is to remove these 4 controls from the base form and add them in each derived forms (7 here). But if i do that i'll loose the factorisation benefit for these controls.
-
Hide control inherited from a base form in a specific derived form, this at design-time !Hello everybody, My question is quite simple and i'm not sure there is a solution. But if you have any suggestions to go round, it would be great as i'm not really content of what i'm doing so far. Here is the problem : Let say you have a base form named FORM and 3 derived forms (FORM1...). On the base form you have several controls (buttons, textbox, labels, more than 10) taking all space of the form. On the derived forms you can see them all (design- and run-time) Very easy so far. Let say now that i wan't to replace a textbox by a combobox ONLY on FORM1. I add my combobox at the right place, i make my textbox non-visible by setting the property and all is ok at run-time... but not in the designer ! where i don't have the place to put my inherited textbox cause it's still visible at design-time and my form is full of controls. To make even more simple, i would like to prevent the designer from showing, in a particular derived form, a control inherited from a base form. My "solution" for the moment is to set the location property of my textbox at "1000;1000" so it is not visible in the designer. Thanks for your help S.