.


:




:

































 

 

 

 


Label, StaticText, Panel




Label, StaticText, Panel . Panel − . .

, , Caption. . : Label1->Caption = ;

Caption AnsiString. . , Label1->Caption=3.4; 3,4. , , FloatToStr IntToStr, , +, ().

Color, − Color Font.

Label − . StaticText Panel BorderStyle, − , PanelBevelInner, .

Label StaticText , AutoSize true.

Label WordWrap − , , . WordWrap true, AutoSizefalse, , .

StaticText , AutoSize false, − .

.

 

Label StaticText .

1. ( Windows), C++Builder 6, .

2. Label1, Color , , Caption , Font ( ) ColorclHotLight, Size − 8 , , − , − .

3. Label2. , 100 , ColorclYellow, AutoSizefalse, WordWraptrue, − .

4. , Label2, StaticText1. , 12. Caption , Color clCream.

5. StaticText2. AutoSize false, − Label2.

6. Button1 Caption .

7. #include<stdlib.h>

8. ( ) :

const int n=100;

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

void __fastcall Tform1::Button1Click(Tobject *Sender)

{ AnsiString s1,s2;

int i,j,k[n],z;

for(i=0;i<n;i++) k[i]=random(101)-50;

s1=s2=;

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

Label2->Caption=s1; //

//

for(i=0;i<n-1;i++)

for(j=i+1;j<n;j++)

if(k[i]>k[j]) {z=k[i]; k[i]=k[j]; k[j]=z;}

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

StaticText2->Caption=s2; //

}

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

9. . , .





:


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


:

:

.
==> ...

1313 - | 1261 -


© 2015-2024 lektsii.org - -

: 0.014 .