Announcement

Collapse
No announcement yet.

vb.net - tab control background color

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 Files
    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
    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.

    Comment


    • #3
      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.

      Comment


      • #4
        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.
        --------------------------
        Software Developed:
        DS-ATX Controller Interface
        Laptop Shutdown Controller

        Considered Projects:
        TPMS Interface
        Bluetooth Handsfree Interface (WIDCOMM/BROADCOMM)

        Comment


        • #5
          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

          Comment


          • #6
            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.

            Comment


            • #7
              Wpf.

              I imagine this is possible with WPF.

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

              Comment

              Working...
              X