Posted 19 years ago by dmelinosky
Avatar
Not sure if it is possible, but can each tab in a tab strip control be drawn with a different tab background color and text color.

Here's what I was doing. I made a tab strip control with 3 tabs in it. The first and last tab contain textbox and listbox controls respectively which are docked. So the white tab naturally blends with the white background of the contained control. In the second tab I placed a panel, docked it and changed it's background color. Now the tab and the panel don't really blend all that well.

I thought the colors could possibly be exposed as properties that could be edited at design time. Just a thought.

Comments (4)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Good idea... we've added a configurable Font, ForeColor, and BackgroundFill property for tabs in both selected and unselected modes, so 6 new properties total. These have been added to TabStripPage. They will let you override the default renderer settings so you can give each tab a custom appearance.

Back on your posting, you shouldn't need to place a Panel in the TabStripPage since the TabStripPage is a ContainerControl. Also, the renderer has a default BackgroundFill property for the background of a TabStripPage. There also is a page-specific override BackgroundFill property on TabStripPage, even in the current beta 1.

Look for a new beta very soon.


Actipro Software Support

Posted 19 years ago by dmelinosky
Avatar
About the TabStripPage background color, I'm looking at the properties window right now and don't see one. Under appearance, where I assume it would be, I see:

Active
Cursor
Image
ImageIndex
RightToLeft
Text
ToolTipText

The reason I put the panel in there was to change the background color. Since I didn't see a property, I used the panel.

If I use the renderer to set the background color, then all the tabs will have that color when what I'm looking for is one of the tabs to have a different color.

I'll check out beta 2 and see how it works now.
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Even in Beta 1, if you run the sample app, open the TabStrip demo, click on the ... button for the Pages collection, you'll see a BackgroundFill property.

In Beta 2, we've added a bunch more TabXXX properties in the same spot.


Actipro Software Support

Posted 19 years ago by dmelinosky
Avatar
I've loaded Beta 2 and found exactly what I was looking for. Nice job <IMG SRC="smile.gif" border="0">
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.