|
-
May 27th, 2003, 02:15 AM
#1
Thread Starter
Hyperactive Member
Queston for any experienced control progger
It looks like I am going to have to write my own tab control, because we can't find features on currently existing tab controls on the market to meet our needs.
I need to be able to control borders (etched, flat, 3D, etc) around the entire tab area, colors (selected tab, unselected tabs, background color behind the actual tab strip, and color of the tab area), and include a toolbar inside each tabs area. The best example I have found that meets this requirement are the tabs in Test Director (I have attached links to screen shots).
I have two questions:
1) Does anyone know of a tab control that meets these requirements
and more importantly . . .
2) Where is a good place to start (books, web sites, source code, other references) to begin to code such a project
Thanks.
FLL
Screen shot 1 - tab look:
http://www.hisoftware.com/MercuryInteractive/tdsc5.htm
Screen shot 2 - toolbar on tab:
http://www.hisoftware.com/MercuryInt...tdscviewer.htm
-
May 27th, 2003, 02:30 AM
#2
Lively Member
If it helps any, you can put a toolbar control in a picturebox, and then have that picturebox show when the user clicks a particular tab. This may increase your chances of finding an appropriate tab control, or at least make things a little easier when you start making one.
-
May 27th, 2003, 02:41 AM
#3
Thread Starter
Hyperactive Member
While that option would serve some of the functionality of the control, the requirements (which I won't list here b/c they are long) ask for a control that is lightweight (probably not using picture boxes or the existing SStab control) and allow for a choice in tab display (rounded edges, box edges, etc). This looks like it will require a third party control. I have not been able to find one, which means I will be creating the control from the ground up. If no one knows of a third party control that meets these requirements, I'd appreciate some direction on where to start on this one.
Thanks
FLL
-
May 27th, 2003, 03:02 AM
#4
The windows class anme for the tab common control is "SysTabControl32" which you need to pass as the szClass parameter to the CreateWindowEx API call to create a new TAB window.
The tab control has the following sytle modifiers:-
VB Code:
Public Enum TabControlStyleFlags
TCS_SCROLLOPPOSITE = &H0001
TCS_BOTTOM = &H0002
TCS_RIGHT = &H0002
TCS_MULTISELECT = &H0004
TCS_FLATBUTTONS = &H0008
TCS_FORCEICONLEFT = &H0010
TCS_FORCELABELLEFT = &H0020
TCS_HOTTRACK = &H0040
TCS_VERTICAL = &H0080
TCS_TABS = &H0000
TCS_BUTTONS = &H0100
TCS_SINGLELINE = &H0
TCS_MULTILINE = &H0200
TCS_RIGHTJUSTIFY = &H0000
TCS_FIXEDWIDTH = &H0400
TCS_RAGGEDRIGHT = &H0800
TCS_FOCUSONBUTTONDOWN = &H1000
TCS_OWNERDRAWFIXED = &H2000
TCS_TOOLTIPS = &H4000
TCS_FOCUSNEVER = &H8000
End Enum
If you can't get the style you want from these then you need to specify TCS_OWNERDRAWFIXED and subclass the window that is created. Then when you get the message WM_DRAWITEM you need to draw the tab as you would like it.
Hope this helps,
Duncan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|