Hi there,
I have added a custom user control and the design view is not quite practical. I'm new to this but I do not understand why I can't see the controls that I add to it the same way I see controls on my main forms. What I see is a list type of design, I don't see the real controls, I see a more sequential layout of it. I can't do much with the mouse, like re-adjust the borders and all, do I really have to set all this through the code behind???
Thanks!
Loading
EmiliePosted May 26, 2008, 7:38 PM
I basically have my class written that way:
public partial class Function : TabPage//UserControl//
When I want to design the control, I switch it to:
public partial class Function : UserControl//TabPage//
That way I can run it without error and with a quick spin of wand, I can also have control of the layout in the design view...
EmiliePosted May 12, 2008, 7:27 PM
I have a designer view, but the controls on there (so inside my user control) are tiny...
I can't show you with a screenshot (too bad!) but I have two things on there, a text box and a button. The text box is small and has written in it "ab" and the name of the text box is right next to it. Same thing with the button.
So I guess it is a custom control, but isn't there a way to see with the same formats the controls in there as in my main form?
I am questioning now the whole direction that I took for my app.
To simplify things, let me summarize. I need to be able to dynamically display an "area" that always has the same controls in it. I wanted to use the cool TabControl control on my main form so I created a custom control that inherits TabPage. So each time I click on that option in the menu, a new Tab appears with the appropriate controls on it. Is that a good move? How else could I have done this?
Thanks!
Emmi
Scott LyslePosted May 11, 2008, 1:09 AM
It sounds like you have a custom control rather than a user control; if it were a user control (with a design surface) you would see the control both from the designer as well as after dropping it onto a form. Also, if it is a custom control rather than a user control, does it extend an existing control. For example:
public
class CaseCombo : ComboBoxDeclaring a custom control like this will make the control visible on the form at design time.