ShowCaption (Delphi)
Description
This example demonstrates the use of the ShowCaption and WordWrap properties, and of the OnBaloonClick event.
Code
procedure TMainForm.Button1Click(Sender: TObject);
begin
FlowPanel1.Enabled := True;
Panel1.Enabled := True;
RadioGroup1.Enabled := True;
if FlowPanel1.ShowCaption then
begin
FlowPanel1.ShowCaption := False;
Panel1.ShowCaption := False;
end
else
begin
FlowPanel1.ShowCaption := True;
Panel1.ShowCaption := True;
end;
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
RadioGroup1.WordWrap := True;
TrayIcon1.ShowBalloonHint;
TrayIcon1.Animate := True;
TrayIcon1.BalloonFlags := bfInfo;
TrayIcon1.BalloonHint := 'This is the balloon hint';
TrayIcon1.BalloonTimeout := 1000;
TrayIcon1.BalloonTitle := 'This is the balloon title';
TrayIcon1.Hint := 'This is the hint';
TrayIcon1.Icons := ImageList1;
TrayIcon1.Visible := True;
FlowPanel1.Alignment := taRightJustify;
FlowPanel1.BorderStyle := bsSingle;
FlowPanel1.Color := clHotLight;
FlowPanel1.Enabled := False;
Panel1.Alignment := taCenter;
Panel1.BorderStyle := bsSingle;
Panel1.Color := clGreen;
Panel1.Enabled := False;
end;
procedure TMainForm.TrayIcon1BalloonClick(Sender: TObject);
begin
ShowMessage('You clicked the balloon');
end;
Uses
- Vcl.ExtCtrls.TFlowPanel.ShowCaption ( fr | de | ja )
- Vcl.ExtCtrls.TFlowPanel.Alignment ( fr | de | ja )
- Vcl.ExtCtrls.TFlowPanel.BorderStyle ( fr | de | ja )
- Vcl.ExtCtrls.TFlowPanel.Color ( fr | de | ja )
- Vcl.ExtCtrls.TFlowPanel.Enabled ( fr | de | ja )
- Vcl.ExtCtrls.TPanel.ShowCaption ( fr | de | ja )
- Vcl.ExtCtrls.TPanel.Alignment ( fr | de | ja )
- Vcl.ExtCtrls.TPanel.BorderStyle ( fr | de | ja )
- Vcl.ExtCtrls.TPanel.Color ( fr | de | ja )
- Vcl.ExtCtrls.TPanel.Enabled ( fr | de | ja )
- Vcl.ExtCtrls.TRadioGroup.WordWrap ( fr | de | ja )
- Vcl.ExtCtrls.TCustomTrayIcon.OnBalloonClick ( fr | de | ja )
- Vcl.ExtCtrls.TCustomTrayIcon.Animate ( fr | de | ja )
- Vcl.ExtCtrls.TCustomTrayIcon.BalloonFlags ( fr | de | ja )
- Vcl.ExtCtrls.TCustomTrayIcon.BalloonHint ( fr | de | ja )
- Vcl.ExtCtrls.TCustomTrayIcon.BalloonTimeout ( fr | de | ja )
- Vcl.ExtCtrls.TCustomTrayIcon.BalloonTitle ( fr | de | ja )
- Vcl.ExtCtrls.TCustomTrayIcon.Hint ( fr | de | ja )
- Vcl.ExtCtrls.TCustomTrayIcon.Icons ( fr | de | ja )
- Vcl.ExtCtrls.TCustomTrayIcon.Visible ( fr | de | ja )