.


:




:

































 

 

 

 


Edit, LabeledEdit, MaskEdit




Edit, LabeledEdit MaskEdit.

BorderStyle. Text AnsiString. . . , , , . AutoSize , .

AutoSelect , . true, , .

SelLength, SelStart, SelText , .

. true ReadOnly AutoSelect false. , . − , . , .

Text AnsiString. . , Edit1->Text=5./2; 2,5. StrToFloatStrToInt − .

MaxLength . MaxLength =0, . MaxLength , .

Modified, , , . false. (true false) , .

LabeledEdit, , Edit, . EditLabel Caption, Color, Font, WordWrap .

LabelPosition LabeledEdit , : lpAbove − , , lpBelow − , , lpLeft − , lpRight − .

MaskEdit EditMask. , , , , , ..

 

Edit LabeledEdit .

1. .

2. , , , Label1, − Edit1, − Button1. Caption , Text , Caption .

3. LabeledEdit1, Button2. . Caption EditLabel , Caption .

4. LabeledEdit2, . Caption EditLabel.

5. , , Edit1. ActiveControl Edit1.

6. :

int n=0, i=0, k[100];

void __fastcall TForm1::Button1Click(TObject *Sender)

{

Edit1->SetFocus();

LabeledEdit2->Text="";

LabeledEdit1->EditLabel->Caption=" k["+IntToStr(i)+"]=";

n=StrToInt(Edit1->Text);

Label1->Caption=" = "+IntToStr(n);

Edit1->Text="";

LabeledEdit1->SetFocus();

i=0;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button2Click(TObject *Sender)

{

k[i]=StrToInt(LabeledEdit1->Text);

LabeledEdit1->SetFocus();

i++;

LabeledEdit1->EditLabel->Caption=" k["+

IntToStr(i)+"]=";

if(i==n){LabeledEdit1->EditLabel->Caption=" !";

LabeledEdit2->EditLabel->Caption=" ";

AnsiString s1="";

for(i=0;i<n;i++)s1+=" "+IntToStr(k[i]);

LabeledEdit2->Text=s1;

Edit1->Text="";

LabeledEdit1->Text="";

Edit1->SetFocus();

i=0; }

}

//---------------------------------------------------------------------------

7. . , .





:


: 2015-10-01; !; : 1535 |


:

:

, .
==> ...

1711 - | 1523 -


© 2015-2024 lektsii.org - -

: 0.012 .