Creating New Tab Control help

PiggyBank1974

Newcomer
Joined
Sep 28, 2004
Messages
9
Hi There,

I've decided to create a new Tab control, because the standard one is for a better word crap!! and i want to change how the way it looks etc and this is not possible with the standard control, I think.

any how I've sort of worked out that the standard control is built into 2/3 parts.

Correct me if I'm wrong here!!

(1) Block, a rectangle container that holds the other controls that the user adds to that particular page only.

(2) The Page this holds part (1) and is not allowed to hold other controls unless they are in the Block container itself.

(3) The list or binder this is a sort of collection and holds the individual pages.

now I've got the first part of the control working, the rectangle container, but when i add this control to the page control in the desiger it does not fire the container control block to add the control to the blocks rectangle, I hope that make sence.

the block container control works fine on its own.

I've uploaded a zip file with the controls so you can see what i mean.

any help would be great.

the pig..
 

Attachments

Last edited by a moderator:
Hi...
This control isn't the hardest thing to do but it's not that simple either.

I've developed something I called a myLayerPanelControl.
The core funtionality of this control, on its first version, is to provide something like a tabcontrol but without the tabs ;)

Later, on a future 2nd version the tabs will appear, as also some themes, and other UI enhancements.

So what you need to implement is:
1- A base (tab container) control, i.e. clean UserControl
1.1- Implement Verbs to add & remove tabs, move next/previous
1.2- It's allways nice to have a Designer to manage the tabs... i.e. a Verb that calls a designer Form, where the user can config the control.

2- A tabcontrol, i.e. inherited Windows.Forms.Panel control

3- A tablistcontrol, i.e. inherited Windows.Forms.Panel control, that you can dock on (1) to draw the tabs, manage the HitTest for mouseclick over a tab and show its tabcontrol, manage multiple line tablist, manage single line tablist scroll, manage tablist themes, manage tablist item drag&drop to reorder tabs... etc...

4- ...

If you got those 3 points donne, you got a pretty nice control already... :D

Advise:
Keep OOP logic in mind...
Create seperated classes to manage seperated things.
Create baseClasses (use MustInherit classes or Interfaces), so you can change behaviour by just changing the core class, not the complete code...

Alex :p
 
Back
Top