8
form, labelC, entry, button : newtComponent;
17
newtOpenWindow(10, 5, 40, 8, 'Entry and Label Sample');
19
labelC := newtLabel(1, 1, 'Enter a string');
23
entry := newtEntry(16,1,PChar(S),20,@P,NEWT_FLAG_SCROLL OR NEWT_FLAG_RETURNEXIT);
26
button := newtButton(17, 3, 'Ok');
27
form := newtForm(NiL, NiL, 0);
28
newtFormAddComponents(form, labelC, entry, button, NiL);
34
writeln('Final string was:'+ strPas(P));
36
(* We cannot destroy the form until after we've used the value
37
from the entry widget. *)
38
newtFormDestroy(form);