把这个控件装上就可以了
unit MultiLinePaletteExpert;
interface
uses
Forms, Controls, ComCtrls;
implementation
type
TMultiLinePalette = class
public
procedure ResizeComponentPalette(Sender : TObject);
end;
var
MultiLinePalette : TMultiLinePalette;
procedure TMultiLinePalette.ResizeComponentPalette(Sender : TObject);
var
AHeight : integer;
begin
with (Sender as TTabControl) do
begin
AHeight := Height + DisplayRect.Top - DisplayRect.Bottom + 30;
Constraints.MinHeight := AHeight;
Parent.Constraints.MaxHeight := AHeight;
end;
end; {ResizeMultiLineComponentPalette}
procedure SetMultiLineComponentPalette(MultiLine : boolean);
var
AppBuilder : TForm;
TabControl : TTabControl;
begin
AppBuilder := TForm(Application.FindComponent('AppBuilder'));
if (AppBuilder <> nil) then
begin
TabControl := TTabControl(AppBuilder.FindComponent('TabControl'));
if (TabControl <> nil) then
begin
TabControl.MultiLine := MultiLine;
if MultiLine then
TabControl.OnResize := MultiLinePalette.ResizeComponentPalette
else
TabControl.OnResize := nil;
end;
end;
end; {SetMultiLineComponentPalette}
initialization
MultiLinePalette := TMultiLinePalette.Create;
SetMultiLineComponentPalette(True);
finalization
SetMultiLineComponentPalette(False);
MultiLinePalette.Free;
end.