DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: deliping
今日帖子: 22
在线用户: 9
导航: 论坛 -> 发布控件 斑竹:liumazi,ruralboy  
作者:
男 qym1113 (fenghe) ★☆☆☆☆ -
普通会员
2005/3/26 0:58:04
标题:
Label和SpeedButton的绑定问题,谢谢大家!! 浏览:1887
加入我的收藏
楼主: 这是一个继承TSpeedButton的一个控件,我添加了一个Label属性,但是在把这个
控件添加到Form时,为什么在Form的任何地方都看不到Label呢?
请高人指点一下!谢谢
unit SpeeLabel;

interface

uses
  SysUtils, Classes, Controls, Buttons, StdCtrls;

type
  TSpeeLabel = class(TSpeedButton)
  private
    FKeyLabel: TLabel;
    { Private declarations }
  protected
    { Protected declarations }
  public
    { Public declarations }
    constructor Create(AOwner: TComponent);override;
  published
    { Published declarations }
    property KeyLabel: TLabel read FKeyLabel;
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('KTButton', [TSpeeLabel]);
end;

{ TSpeeLabel }



{ TSpeeLabel }

constructor TSpeeLabel.Create(AOwner: TComponent);
begin
  inherited;
  FKeyLabel := TLabel.Create(Self);
  FKeyLabel.SetSubComponent(True);
  FKeyLabel.Parent := Self.Parent;
  FKeyLabel.Visible := True;
end;

end.
----------------------------------------------
-
作者:
男 sephil (NAILY Soft) ★☆☆☆☆ -
盒子中级会员
2005/3/26 13:21:54
1楼: Label没有Caption看不见而已吧
设置一下Caption
----------------------------------------------
Copyright 2008 ? NAILY Soft

Click here to redirect to my home
Click here to redirect to my blog
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行62.5毫秒 RSS