hi, I'm fairly experienced with delphi however
have come across a tiny problem, i have a create
box known as Edit1 for my web browser, but the
label on this is always edit1, before you type the
text into it, how can i make this blank or at least
edit the text? thanks!

would love a reply asap :)

Recommended Answers

All 3 Replies

1. At design time you may clear the Edit1 text from the Property Text
2. At runtime you may execute: Edit1.Text := '';

If you select your box in the Design mode, it will bring up a list of properties on the left side of your screen.
Scroll through this list and find a value called Text, this will change the default value of that textbox.

on the form's onshow events :

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormShow(Sender: TObject);
begin
  Edit1.Text:='';
end;

end.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.