请教各位大哥:  像 QQ 那样 单击一下聊天记录,则下面出现一个写字板的东西,单击聊天模式,则哪个东西又没看见了,这要怎么实现啊? 谢谢!

解决方案 »

  1.   

    其实你可以下面放一个memo,通过点击按钮使其隐藏,并调整窗口大小实现
      

  2.   

    在你的窗体最下方放一个panel,设置其属性align为albottom,然后用panel.visible控制其显示或隐藏,可达到你想要的效果
      

  3.   

    巨简单,设置Visible属性就可以实现
      

  4.   

    procedure TForm1.btn1Click(Sender: TObject);
    begin
      pnl1.Visible:=not pnl1.Visible;
      if not pnl1.Visible then
        self.Height:=self.Height-pnl1.Height
       else
         self.Height:=self.Height+pnl1.Height;
    end;
    pnl的align的值为alBottom
      

  5.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        Memo1: TMemo;
        procedure Button1Click(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    begin
      if tag=0 then
         begin
           Height:=400;
           Memo1.Visible:=True;
           tag:=1;
         end
      else
         begin
           Height:=300;
           Memo1.Visible:=False;
           tag:=0;
         end;
    end;procedure TForm1.FormCreate(Sender: TObject);
    begin
      Height:=300;
    end;end.
      

  6.   

    一个panel align albottom panel.visible 控制其显示或隐藏 
      

  7.   

    visible控制输入框的显示或隐藏,height控制窗口大小