即开始时,Edit.visible=false,Button.text="hide";
单击奇数次时 Edit.visible=true,Button.text="show";
单击偶数次时,仍为 Edit.visible=false,Button.text="hide";另 如Edit内文字过多,如何使之多行显示?应调整那一种参数?该如何调整?

解决方案 »

  1.   

    richedit控件
    直接在button的click事件里写...
    Edit.visible:=not Edit.visible;
    if edit.visible then button.text:="show"
    else
      button.text:='hide';
      

  2.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      edit1.Visible:=not edit1.Visible;
      if button1.Caption='show' then button1.Caption:='hide'
      else button1.Caption:='show';
    end;
      

  3.   

    procedure form1.button1click(Sender:TObject)
    begin
    edit.visible = not edit.visible;
    if edit.visible then
    begin
    button.text='hide';
    end;
    else
    button.text = 'show'
    end;
      

  4.   

    Edit.visible:=not Edit.visible;
    if edit.visible then button.text:="show"
    else
      button.text:='hide';
      

  5.   

    直接在button的click事件里写...
    Edit.visible:=not Edit.visible;
    if edit.visible then button.text:="show"
    else
      button.text:='hide';
      

  6.   

    Edit.visible:=trim(button.text)='show';   //Tbutton好像只有caption吧
    if trim(button.text)='show' then
       button.text:='hide'
      else
       button.text:='show';
      

  7.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      edit1.Visible:=not edit1.Visible;
      if button1.Caption='show' then button1.Caption:='hide'
      else button1.Caption:='show';
    end;
      

  8.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      edit1.Visible:=not edit1.Visible;
      if Trim(button1.Caption)='show' then button1.Caption:='hide'
      else button1.Caption:='show';
    end;