Board index » delphi » Re: Disabling the Gradient Toolbars

Re: Disabling the Gradient Toolbars


2008-02-26 09:03:35 PM
delphi88
On Tue, 26 Feb 2008 14:10:10 +0200, Farshad writes:
Quote
Is there an easy way to disable the Gradient Toolbars in the IDE?
I found a tip here but not sure if it is applicable to Delphi 2007.

jedqc.blogspot.com/2006_02_01_archive.html
I have no idea if it works. Did you try it out?
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
 
 

Re: Disabling the Gradient Toolbars

"Marc Rohloff [TeamB]"
Quote
>jedqc.blogspot.com/2006_02_01_archive.html

I have no idea if it works. Did you try it out?
No. But I am going to try it.
 

Re: Disabling the Gradient Toolbars

Farshad writes:
Quote
Is there an easy way to disable the Gradient Toolbars in the IDE?

I found a tip here but not sure if it is applicable to Delphi 2007.

jedqc.blogspot.com/2006_02_01_archive.html
Just curious as why you would even bother?
--
 

Re: Disabling the Gradient Toolbars

Farshad sayz:
Quote
Is there an easy way to disable the Gradient Toolbars in the IDE?

I found a tip here but not sure if it is applicable to Delphi 2007.

jedqc.blogspot.com/2006_02_01_archive.html
Here's a stripped down version of what I am using. Stuff it into a bpl
project, compile, install the package.
unit IDEHacks;
interface
uses
Windows, Classes, Controls, SysUtils, ActnMenus, Graphics, Dialogs,
ExtCtrls, ToolWin, ActnMan, Forms;
type
TIDEHacks = class
public
class procedure ExecuteHack;
end;
procedure Register;
implementation
procedure Register;
begin
TIDEHacks.ExecuteHack;
end;
const
MAIN_WND_CLASS = 'TAppBuilder';
EDIT_WND_CLASS = 'TEditControl';
{ TIDEHacks }
class procedure TIDEHacks.ExecuteHack;
var
i: integer;
IDE: HWnd;
IDEClass: TWinControl;
MainMenu: TActionMainMenuBar;
ControlBar: TControlBar;
begin
// Find IDE
IDE := FindWindow(MAIN_WND_CLASS, nil);
IDEClass := FindControl(IDE);
if (IDEClass = nil) then
Exit;
MainMenu := nil;
ControlBar := nil;
// FInd control bar
for i := 0 to IDEClass.ControlCount - 1 do
begin
if (IDEClass.Controls[i] is TControlBar) then
begin
ControlBar := TControlBar(IDEClass.Controls[i]);
ControlBar.DrawingStyle := dsNormal;
end;
end;
if (ControlBar = nil) then
Exit;
// Find main menu
for i := 0 to ControlBar.ControlCount - 1 do
begin
if (ControlBar.Controls[i] is TActionMainMenuBar) then
begin
MainMenu := TActionMainMenuBar(ControlBar.Controls[i]);
Break;
end;
end;
if (MainMenu = nil) then
Exit;
MainMenu.ActionManager.Style := ActionBarStyles.Style[1];
MainMenu.AnimationStyle := asUnFold;
MainMenu.AnimateDuration := 125;
end;
end.