TBalloonHint显示为默认值?

时间:2017-01-13 13:52:59

标签: delphi delphi-10.1-berlin balloon-tip

创建VCL表单应用程序,在表单上放置TBalloonHintTButton,并在按钮的click-event处理程序中编写此代码:

procedure TForm2.btnTestClick(Sender: TObject);
begin
  if balloonhintTest.ShowingHint then
    ShowMessage('balloonhintTest is showing')
  else
    ShowMessage('balloonhintTest is not showing');
end;

奇怪的是,在运行时单击按钮时,会显示以下消息:

enter image description here

...虽然它从未以编程方式显示balloonhintTest.ShowHint

到目前为止,我发现阻止这种情况的唯一方法是以下解决方法:

procedure TForm2.FormCreate(Sender: TObject);
begin
  balloonhintTest.HideHint;
end;

那么为什么BalloonHint被报告为显示(虽然它根本没有物理显示)作为默认值,并且有没有更好的方法将其设置为False作为默认值?

0 个答案:

没有答案
相关问题