Results 1 to 7 of 7

Thread: vb.net - tab control background color

  1. #1
    Variable Bitrate warnockm's Avatar
    Join Date
    Jun 2004
    Location
    Virginia
    Posts
    433

    vb.net - tab control background color

    this is the first time i've seen the developer message board. i know there are a lot of good developers on here, so i thought i'd ask as question or two. I currently working on skin support for my weather program. I've added images to the buttoms and the ability to change text and background color. However, i can't seem to change the options on the part of the tab control that doesn't have tabs on it. i attached the screenshot w/ a red "X" where i'm having the problems. I've tried changing the tabcontrol.backcolor, each tabpage.backcolor, but while these change the backgrounds of the tabs, it does not change the background color of this area.

    any ideas?
    Attached Images Attached Images  
    Progress - VIA EPIA SP8000 | 120 Opus Power Supply & Case | 1GB Ram | 120GB 2.5" Hard Drive | Bluetooth 2.0 | GPRS/3G | Wifi | Road Runner/LSX 2.0 (waiting for a day skin for 3.0) | iGuidance 4.0 | Lilliput 7"

  2. #2
    lbk
    lbk is offline
    Low Bitrate
    Join Date
    Feb 2003
    Location
    Chicago
    Posts
    87
    The built in control gives you no way to do it. You could either build your own tab control, maybe even inherit from the built in one, or try searching for someone else's tab control. There are plenty of them out there, infragistics has one, but not sure how expensive their lowest end package is that includes it.

  3. #3
    Newbie
    Join Date
    May 2006
    Posts
    6
    Quote Originally Posted by lbk
    The built in control gives you no way to do it. You could either build your own tab control, maybe even inherit from the built in one, or try searching for someone else's tab control. There are plenty of them out there, infragistics has one, but not sure how expensive their lowest end package is that includes it.
    Another option is this tab control. I have used it in a a few of my projects. It just extends the standard tab control.

  4. #4
    Variable Bitrate
    Join Date
    Apr 2006
    Location
    Dallas, Texas
    Posts
    264
    You can customize the background color of the tabs by using owner drawn tabs. While this gives you amazing flexability in what you want to do with the control, it also involves a bit more coding just to change the background color.

  5. #5
    Newbie
    Join Date
    Jun 2006
    Location
    Louisville, KY
    Posts
    6
    It appears you've got images in your tab headings is that correct?

    If so, just swap the image for one with the correct colored background from a resource file, or other form. I'd make it an array of image controls, ie: Tab1(0).picture = not selected and Tab1(1).picture = selected.

    That way you can just update the image with currenttab.picture = tab1(selected).picture

  6. #6
    Newbie
    Join Date
    May 2009
    Posts
    1

    Smile Robust solution

    I looked all over for a solution that would fix the BackColor as well as allow bleed through from the parent form or control for BackgroundImage or BackColor, include icon support, and be reusable for all TabControls. I'm not sure if this will help with what you are doing or not, but my solution is detailed here with the full code for the method.

  7. #7
    Newbie
    Join Date
    Aug 2009
    Posts
    1

    Wpf.

    I imagine this is possible with WPF.

    Bad news though, you'll need to redo your entire interface.

Similar Threads

  1. Pinout Color Codes / Tables
    By gummybear in forum General Hardware Discussion
    Replies: 4
    Last Post: 05-12-2005, 04:05 AM
  2. AC97 Control Panel Switcher Program (could be useful for many)
    By Vinister in forum Software & Software Development
    Replies: 0
    Last Post: 02-02-2005, 04:50 PM
  3. change color of windows startup background?
    By aoLhaTer in forum Software & Software Development
    Replies: 10
    Last Post: 06-17-2004, 11:16 AM
  4. Replies: 3
    Last Post: 05-26-2004, 05:08 AM
  5. Replies: 22
    Last Post: 08-13-2001, 02:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •