asked on
ASKER
procedure TForm1.Button1Click(Sender: TObject);
var aBubble: TBubble;
aExtent: TPoint;
aSize: TSize;
begin
aText := 'Ouch, you clicked me !!'#13#10'Twice !!!';
aBubble := TBubble(FindComponent('BubblyButton'));
if aBubble = nil then
aBubble := TBubble.Create(Self);
aBubble.Parent := Self;
aBubble.Top := TButton(Sender).Top + 20;
aBubble.Left := TButton(Sender).Left + 20;
aSize := aBubble.Canvas.TextExtent(aText);
aBubble.Width := aSize.cX + 20;
aBubble.Height := aSize.cY + 20;
aBubble.Text := aText;
aBubble.Name := 'BubblyButton';
aBubble.Invalidate;
end;
ASKER
Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.
TRUSTED BY
type
TEditBalloonTip = packed record
cbStruct: DWORD;
pszTitle: PWideChar;
pszText: PWideChar;
ttiIcon: Integer;
end;
const
EM_SHOWBALLOONTIP = $1503;
TTI_EMPTY = 0;
TTI_INFO = 1;
TTI_WARNING = 2;
TTI_ERROR = 3;
procedure TForm1.Button1Click(Sender
var baloon: TEditBalloonTip;
begin
baloon.cbStruct := SizeOf(baloon);
baloon.pszTitle := 'Hint title';
baloon.pszText := 'warining message here';
baloon.ttiIcon := TTI_WARNING;
SendMessage(Edit1.Handle, EM_SHOWBALLOONTIP, 0, Integer(@baloon));
end;
ziolko.