No.1 把TLable放在TPanel上
object Button1: TButton
  Left = 128
  Top = 120
  Width = 75
  Height = 25
  Caption = 'Button1'
  TabOrder = 0
  OnClick = Button1Click
end
object Panel1: TPanel
  Left = 142
  Top = 123
  Width = 49
  Height = 16
  BevelOuter = bvNone
  TabOrder = 1
  object Label1: TLabel
    Left = 8
    Top = 1
    Width = 32
    Height = 13
    Caption = 'Label1'
  end
endNo.2 把TLabel放在TButton上 //不建议
Label1.Parent := Button1;
Label1.Left := 0;
Label1.Top := 0;

解决方案 »

  1.   

    在TButton上放一個TPanel,再在TPanel上放TLabel
      

  2.   

    把TLable放在TButton上或TButton的visible属性设为FALSE
      

  3.   

    不能使用中间控件,要把TLabel直接放到TButton上。
    我在使用中发现只要一把lable放到button上。lable就自动跑到Button下了。我这样做的目的是,想把label设为透明,然后放到Button上。这样,就不能点击Button了。不要告诉我可以用button.enable:=false代替,我这样做有我的理由
      

  4.   

    简单,将 Button 设成不可见的不就完了、。
    button.Visible := False;
      

  5.   

    设为不可见,我还放 他上去干什么?我的目的就是要让别人看得到,但点不动。
    当然也可以自己继承TButton后自己实现 ,但还是没有把一个lable放到上面来的简单。
    把lable放到上面,点的就是lable,Button当然就没反应啦。
      

  6.   

    一个button
    点不动,???
    我就想把BUTTON的图COPY过来一个,
    就那种*好看的,
    你非常想点的,
    就是点不动,!!!
      

  7.   

    可如果我想让dbgrid点不动呢?一点它上班就出新兰色的焦点。客户很不喜欢。所以要用一个label遮住他。
      

  8.   

    用TBITBTN不就可以完成你现在的功能,将tbitbtn的flag设为false
      

  9.   

    自己写一个扩展的button,有LOCK属性,如果被LOCK了,就把鼠标消息都吃了,不让它响应。就是在click中少写一个inherited。看看让FLASH的右击菜单消失的例子,不要学vb程序员,耍这种小聪明。
      

  10.   

    create中:
      application.onmessage:=mymessage;
    PUBLISH中:
      procedure mymessage(var msg:tmsg;var handled:boolean);
    实现:
      procedure tform1.mymessage(var msg:tmsg;var handled:boolean);
        begin
          if (msg.message=wm_Lbuttondown) and (msg.hwnd=Button.handle) then
            begin
              if Locked then handled:=true;
            end;
        end;   
      

  11.   

    label1.parent:=Button1;
    label1.Align:=Alclient;
      

  12.   

    你可以用tpanel嘛将它的边界设成 none就可以放在button上了嘛!效果和label一样
      

  13.   

    从TButton继承一个控件下来,在其Create中加入:
    ControlStyle := ControlStyle + [csAcceptsControls];
    否则,你说的无法做到,因为TButton控件不能做为其他控件的容器,就是
    因为其ControlStyle属性中没有csAcceptsControls。