Link to home
Start Free TrialLog in
Avatar of vmilanov
vmilanov

asked on

Edit in a MessageDlg

I want to create message dialog with edit  inside and use it !Is this possible?
Avatar of kretzschmar
kretzschmar
Flag of Germany image

just use a form
-set the borderstyle to bsDialog
-place your controls and buttons
-assign a modalResult to the buttons

and use it in your code like

with TMyNewDialog.Create(self) do
begin
  result := showmodal;
  if result = mrOK then
  //.. read out your edits here
     something := DialogEdit1.text;
  //free it
  release;
end;

just as suggestion

meikl ;-)
Even easier. Use InputQuery (ij the Dialogs unit). There are a few versions for strings, integers, reals etc.

Geoff M.
Correction: (IN the Dialogs unit).
ouch, this nice  looking inputquery-box (sarkasm),
but well, maybe its enough

meikl ;-)
ASKER CERTIFIED SOLUTION
Avatar of songhd
songhd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial