`
cfeers
  • 浏览: 142429 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Delphi Component Palette 多行显示

阅读更多

1: 新建一个单元文件,复制如下代码,并保存名称为:MultiLinePaletteExpert.pas

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 + 29;
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.

 

2:打开Delphi 7,新建一个Package,Add刚刚保存的MultiLinePaletteExpert.pas文件,编译、安装。想卸载该Package,在Delphi菜单项选择Component/Install Pacgage,找到我们的bplremove它就可以了,简单吧!

3:最后打开你的Delphi7 ,Component Palette 是不是变多行了?

分享到:
评论

相关推荐

    DELPHI 多行显示构件

    DELPHI多行显示构件是一种在DELPHI编程环境中用于实现多行文本或信息显示的组件,它扩展了标准的单行文本输入或显示控件的功能。DELPHI,全称为Borland Delphi,是面向对象的Pascal编程语言,以其高效的编译器和强大...

    表格控件Vcl TopGrid.v3.01

    If you do not select automatic installation of the components, or if a version of the TopGrid is already installed on the Delphi Component Palette, the TopGrid components will need to be installed ...

    很不错的Delphi窗体-隐藏显示工具栏..rar

    1. **设计阶段**:在Delphi的Form Designer中,从Component Palette面板拖拽一个TToolBar组件到窗体上。然后,可以添加TToolButton组件到TToolBar中,每个ToolButton代表工具栏上的一个按钮。 2. **运行时控制**:...

    Raize控件 delphi版本

    Raize控件 delphi版本 ... Restart RAD Studio and you will see the following pages on the component palette: Raize Panels Raize Edits Raize Lists Raize Buttons Raize Display Raize Shell Raize Widgets

    Delphi连接SQL随机显示数据库中的记录..rar

    在设计界面上,从Component Palette中选择Data Controls &gt; ADO Components &gt; TADOConnection,并将其拖放到Form上。然后,双击该组件打开其属性对话框,配置连接字符串。连接字符串应包含数据库类型、服务器地址、...

    Delphi Rave报表的使用及条码打印

    这通常通过打开Component Palette,然后在Components分类下找到Rave Reports组件,将其拖放到Form上。接着,你需要在报表设计视图中创建一个新的页面,用于显示条形码。 Rave报表支持多种数据源,可以是数据库、...

    delphi 第三方组件安装方法

    将BPL及其依赖的DLL文件放入系统目录或Delphi的BPL目录,然后在Delphi的Component Palette中手动添加新页,选择对应的BPL文件,即可使用组件。 4. **JAR或ZIP文件**:某些开源组件可能以源码的形式提供,例如Java ...

    TMS Component Pack 8.3.4.0 D7-RAD10.2 Tokyo BAT安装版+亲自安装测试

    3. 安装完成后,打开Delphi IDE,你会在组件面板(Component Palette)上看到新增的TMS组件组,表明安装成功。 TMS Component Pack的核心价值在于其丰富的组件集合。其中包括但不限于: - **UI控件**:如高度定制...

    Raize4 For Delphi7/Delphi 2007 源码版

    教程通常会指导用户如何将组件库导入到Delphi的Component Palette,设置编译路径,以及如何解决可能出现的依赖问题。此外,教程还可能涵盖如何在项目中使用新添加的组件,以及配置其属性和方法。 **总结** Raize4 ...

    Unit1_delphi调用显示摄像头内容_

    在Delphi集成开发环境中,打开你的项目,从Component Palette(组件面板)的ActiveX类别中找到TVideoCapture组件,将其拖放到Form上。这个组件会自动在设计界面上显示一个预览窗口。 2. 配置TVideoCapture组件: ...

    delphi 7.0教程 专用图书

    这可以通过从Component Palette选择并放置元件到Form上来实现,然后通过调整元件的位置和大小,或使用Object Inspector来设置元件属性。其次,编写代码阶段涉及到为这些用户界面元素指定事件处理程序,并在Code ...

    Raize Components Full Source 6.2.2 For Delphi 10.2 Tokyo

    Unfortunately, when you restart the IDE, the component palette pages for the newly installed components will appear at the end of the component palette. If you would like to move the Raize pages to ...

    Delphi 连接FTP读取文件数据

    在Delphi中,你可以通过“Component Palette”添加Indy到你的工程,然后在你的Form上放置一个TIdFTP组件。 2. **配置TIdFTP组件**:在TIdFTP组件上设置服务器地址(Host)、用户名(Username)和密码(Password)。...

    带左侧展开菜单的Delphi漂亮界面..rar

    步骤1:在Delphi的Form Designer中,从Component Palette(组件面板)中拖一个TTreeView到窗体上,调整其大小和位置以适应左侧区域。 步骤2:为TTreeView添加数据。这通常涉及到为每个菜单项创建一个TTreeNode,并...

    delphi读取磅秤数据

    1. **设置TSerialPort组件**:在Delphi的Form设计界面中,从Component Palette面板拖拽一个TSerialPort组件到Form上。接着,我们需要配置该组件的属性,如ComPort(选择要连接的COM口)、BaudRate(波特率,如9600、...

    RC6.2.3forD10.3

    Unfortunately, when you restart the IDE, the component palette pages for the newly installed components will appear at the end of the component palette. If you would like to move the Raize pages to ...

    Raize Component

    WELCOME TO RAIZE ... Restart RAD Studio and you will see the following pages on the component palette: Raize Panels Raize Edits Raize Lists Raize Buttons Raize Display Raize Shell Raize Widgets

    delphi 连接数据库简单案例

    在Component Palette中找到Data Access Components,然后将TADOConnection拖放到Form上。接着,我们需要配置这个组件,设置其ConnectionString属性。对于Windows身份验证,Connection String通常包含以下部分: ```...

    01_Raize_v4_11.rar

    the IDE, the component palette pages for Raize Components will appear at the end of the component palette. If you would like to move the Raize pages to the front of the palette, there is an a ...

    如何改变delphi 中按钮的样式

    1. **启动Delphi并新建组件**:选择菜单的"Component"/"New Component"选项。在弹出的对话框中,选择Ancestor Type为TButton,这意味着你的新组件将基于TButton组件进行扩展。 2. **设置组件信息**:在对话框中,...

Global site tag (gtag.js) - Google Analytics