title: Stripping effects on Delphi toolbuttons (TToolbutton)
body: <p>I'm attempting to switch from using Toolbar2000 to the regular toolbar because there doesn't seem to be a Delphi XE2 version and it looks like it uses some Assembly and I just don't really want to deal with it if I don't have to. (and I really like the fade-in effect with the Delphi Toolbar)</p>
  
  <p>But, what I don't like is that the background of the button gets the regular blueish button treatment.  I know how to change the color, but can I just not make the color change and not have a border painted around the button?</p>
  
  <p>I've implemented the 'OnAdvancedCustomDrawButton' but the flags available don't seem to work right and I'm not sure how they interact with the gradient color and the hot track color and I wind up having some weird flashing or weird black backgrounds.</p>
  
  <p>Here's how I'm creating the Toolbar</p>
  
  <pre><code>ToolBar1 := TToolBar.Create(Self);
  ToolBar1.DoubleBuffered := true;
  ToolBar1.OnAdvancedCustomDrawButton := Toolbar1CustomDrawButton;
  ToolBar1.Transparent := false;
  ToolBar1.Parent := Self;
  ToolBar1.GradientEndColor := $7ca0c2; //RGB(194, 160, 124);
  ToolBar1.GradientStartColor := $edeeed; //RGB(237, 238, 124);
  ToolBar1.Indent := 5;
  ToolBar1.Images := Normal;
  ToolBar1.DrawingStyle := dsGradient;
  ToolBar1.HotImages := Over;
  ToolBar1.AutoSize := True;
  ToolBar1.Visible := False;
  </code></pre>
  
  <p>and here's how I'm creating the buttons (in a loop):</p>
  
  <pre><code>ToolButton := TToolButton.Create(ToolBar1);
  ToolButton.Parent := ToolBar1;
  ToolButton.ImageIndex := ToolButtonImages[Index].ImageIndex;
  ToolButton.OnClick := ToolButtonClick;
  </code></pre>
  
  <p>and here's my AdvancedCustomDrawButton function</p>
  
  <pre><code>procedure TMyForm.Toolbar1CustomDrawButton(Sender: TToolBar; Button: TToolButton;
      State: TCustomDrawState; Stage: TCustomDrawStage;
      var Flags: TTBCustomDrawFlags; var DefaultDraw: Boolean);
  begin
    Flags := [tbNoEdges, tbNoOffset];
    DefaultDraw := True;
  end;
  </code></pre>