0

I have a 'hint window leftovers' problem with Virtual Treeview in an Office add-in, and now I want to customize the hint window to solve the problem. I want to use TJvBallonHint from the JVCL package, which is also used in other parts of my program.

I inherited TVirtualStringTree and have overridden the GetHintWindowClass method like the following code. The TJvBallonHint window class is applied, but the hint text is not drawn. Any tips for me? Thank you!

function TMyStringTree.GetHintWindowClass: THintWindowClass;
begin
  Result :=TJvBalloonWindow;;
end;
4

1 に答える 1

0

カスタム クラスは継承する必要TVirtualTreeHintWindowTJvBalloonWindowあります。

正式には必要ありませんTHintWindowClassが、コードを見てくださいTVirtualTreeHintWindow- 使用していませんCaption(ヒントのキャプションが空になっているのはそのためです):

procedure TVirtualTreeHintWindow.CMTextChanged(var Message: TMessage);
begin
    // swallow this message to prevent the ancestor from resizing the window (we don't use the caption anyway)
end;

TJvBalloonWindowペイント用のコードを使用して、新しいヒント ウィンドウ クラスを作成することをお勧めします。

于 2010-03-30T09:04:34.520 に答える