Custom Control (design time resizing) problems

L

Luke

I am designing a variant of the Tab Control. Basically it
is a Wizard Control. Essentially made up of two classes
namely WizardControl and WizardPage.
My problem is that I am trying to get an effect like the
TabPages have when you are in designer mode. Where the
TabPage cannot be resized or moved. I figured out how to
assign a designer to the control so that it can have
objects placed inside it at design time but am unsure how
to produce the same effect as what a TabPage has. Any advice?

Also I have created a collection of WizardPages that keep
track of all the wizard pages on the wizard control. This
works fine but whenever I add a new WizardPage to the
collection I need to recompile the application to see the
pages. Again this is not necessary.

Sorry if this is the wrong place to post this but it was
the only place that I could find since this is for
WindowsForms and not ASP.NET
 
E

Eric Cadwell

Look up SelectionRules. I'm not sure why the page doesn't show up until you
recompile. I have a similar project and it works pretty well. Just be sure
that you are redrawing after the page is added.

HTH;
Eric Cadwell
http://www.origincontrols.com
 
L

Luke

I have figured out that TabPages are just esentially locked
with the Anchor properties set. Though I still have the
problem of the new Pages not being created until I recompile.

Also I now need to know how to set the locked Property at
runtime. The property has The EditorVisible attribute set
to false so it appears I can't change it at runtime.

Also is there a way to make a control invisible at design
time, or does anyone know how TabCOntrol and TabPage
accomplish this as only one page is visible at a time. I am
thinking that it is more complex than just bringing the
current page to the front of the others.

Thanks in advance
 
E

Eric Cadwell

Look up GetHitTest. My control has roughly the same behavior at design time
as it does at runtime - I can click a tab and it repaints itself to show the
appropriate tab page. I didn't have to mess with focus or zorder at all.
Keep playing - it's all trial and error at this level. Also you can post to
windowsforms.designtime.

Here's a good link:
http://www.codeproject.com/cs/miscctrl/propertytree.asp

This is the most complete designer implementation I've found.

-Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top