StdCtrlsProp (Delphi)
Description
This example demonstrates the use of some properties available for TButton, TCustomComboBox, TCustomEdit, TLabel and TMemo objects.
Code
procedure TMainForm.btProcessClick(Sender: TObject);
begin
Memo1.Lines.Clear;
if (SecondaryForm.ShowModal = mrOk) then
Memo1.Lines.Add('Your information has been processed.');
if cmbGender.ItemIndex = 0 then
Memo1.Lines.Add('Male')
else
Memo1.Lines.Add('Female');
Memo1.Lines.Add(edAge.Text);
end;
procedure TMainForm.edAgeChange(Sender: TObject);
begin
edAge.Color := clHotLight;
btProcess.Enabled := True;
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
cmbGender.TextHint := 'Select your gender';
edAge.Alignment := taCenter;
edAge.NumbersOnly := True;
edAge.MaxLength := 2;
btProcess.Enabled := False;
Memo1.CharCase := ecUpperCase;
lblGender.GlowSize := 5;
edInsAge.SetSelText('Age:');
edInsAge.Enabled := False;
end;
Uses
- Vcl.StdCtrls.TCustomButton.ModalResult ( fr | de | ja )
- Vcl.StdCtrls.TCustomComboBox.TextHint ( fr | de | ja )
- Vcl.StdCtrls.TCustomEdit.Alignment ( fr | de | ja )
- Vcl.StdCtrls.TCustomEdit.NumbersOnly ( fr | de | ja )
- Vcl.StdCtrls.TCustomEdit.TextHint ( fr | de | ja )
- Vcl.StdCtrls.TCustomEdit.MaxLength ( fr | de | ja )
- Vcl.StdCtrls.TCustomEdit.OnChange ( fr | de | ja )
- Vcl.StdCtrls.TCustomEdit.SetSelText ( fr | de | ja )
- Vcl.StdCtrls.TCustomLabel.GlowSize ( fr | de | ja )
- Vcl.StdCtrls.TCustomEdit.CharCase ( fr | de | ja )