Divelements Community
Customer discussion of all Divelements products

Background color property

Latest post 08-02-2005 13:19 by Optimus. 7 replies.
  • 03-21-2005 14:19

    Background color property

    Quick question. Is there a way to change the background color of the ButtonBar and/or NavigationBar? When I set the BackgroundColor property to a different color, it continues to use the default "Control" gray color. Simple question, I'm sure, but thought I'd ask.

    Thank you!
  • 03-21-2005 14:22 In reply to

    Clarification - for Navisight, not OutlookBar

    Just wanted to clarify that I can't get the BackgroundColor to work on Navisight.

    Thanks!
  • 03-24-2005 9:49 In reply to

    Background color property

    It looks like this is a bug in the Navisite controls. You should submit this to the "Bug Report" form if you haven't already.
  • 03-24-2005 10:37 In reply to

    Thanks

    Sounds good. Thanks for the reply. I just assumed there was something I was missing to not get it to work. I'll submit it.

    Thanks!
  • 03-27-2005 12:08 In reply to

    Background color property

    The background colour of navigation panes is determined by the renderer you are using. The Office 2002 and 2003 renderers take the standard 3D button colour and make it a little brighter, and the Office 2000 renderer uses a dark application workspace colour by default.

    If you need to change this colour you currently have to override your renderer's PaintCategoryBackground method.
  • 08-01-2005 11:36 In reply to

    Override your renderer's PaintCategoryBackground method?

    I too would like to just change the backcolor of navisight control (buttonBar1) to Application Window (white). I'm very confused about how to do this. I'm trying to override the paint method mentioned but I can't work out what to do. It seems like a lot of effort just to change the backcolor. If the backcolor is not settable why not hide it from the propertygrid (attribute browseable = false)? Same with BackgroundImage property...

    Can anyone -please- show me how to set the backcolor to white in C#?

    Very confused.
  • 08-02-2005 12:05 In reply to

    Is there any reason this doesn't work?

    using System;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Drawing.Imaging;
    using System.Windows.Forms;

    using Divelements.Navisight;

    namespace CustomOffice2003Renderer
    {
    public class CustomOffice2003Renderer: Divelements.Navisight.Rendering.Office2003Renderer
    {
    public override void PaintBackground(Graphics graphics, Rectangle bounds)
    {
    SolidBrush background = new SolidBrush(Color.White);
    graphics.FillRectangle(background, bounds);
    base.PaintBackground (graphics, bounds);
    background.Dispose();
    }

    public override void PaintCategoryBackground(Graphics graphics, Rectangle bounds)
    {
    SolidBrush background = new SolidBrush(Color.White);
    graphics.FillRectangle(background, bounds);
    base.PaintCategoryBackground (graphics, bounds);
    background.Dispose();
    }
    }
    }


    I'm calling it like this:

    this.TaskItemsButtonBar.Renderer = new CustomOffice2003Renderer();
  • 08-02-2005 13:19 In reply to

    Ok, worked it out...

    Now using:

    public override void PaintBackground(Graphics graphics, Rectangle bounds)
    {
    graphics.Clear(SystemColors.Window);
    }

    public override void PaintCategoryBackground(Graphics graphics, Rectangle bounds)
    {
    graphics.Clear(SystemColors.Window);
    }

    In replace of the background brush in the previous post. This seems to work properly.

    Thanks anyway guys.
Page 1 of 1 (8 items) | RSS
Copyright © 2008 Divelements Limited
Powered by Community Server (Commercial Edition), by Telligent Systems