Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #include <stdlib.h>
- #pragma hdrstop
- #include "Unit7.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Edit1KeyPress(TObject *Sender, char &Key)
- {
- if (Key == 13) {
- LB1->Clear();
- String s = Edit1->Text;
- Trim(s);
- for (; s.AnsiPos(" ") != 0;) {
- LB1->Items->Add(s.SubString(0, s.AnsiPos(" ")));
- s.Delete(1, s.AnsiPos(" "));
- }
- LB1->Items->Add(s);
- }
- }
- //---------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement