TadvStringGrid Balloons don't show after selecting a cell without balloon unless mouse leaves the grid

Hi,

On my grid, I have the Balloons enabled and they get information from OnCellBalloon.
The balloons work perfectly fine after the first time the grid is loaded, however, after clicking on a cell in another column which doesn't have a balloon, the balloons stop appearing. If the mouse leaves the grid and enters the grid again, the Balloons work fine again.

In the code example below, with just a TAdvStringGrid on a Tform, follow the steps to reproduce the problem after compilation:
1- Hold the mouse on any cell in column 1. (Balloon appears)
2- Select any cell in any other column.
3- Hold the mouse again on any cell in column 1. (No balloons).
4- Take the mouse out of the grid.
5- Hold the mouse on any cell in column 1. (Balloon appears)

Besides fixing the problem, if you can also let me know the event that fixes the problem when the mouse re-enters the grid, I would appreciate. I tried OnMouseEnter and OnMouseLeave without succes.

unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, AdvUtil, Vcl.Grids, AdvObj, BaseGrid, AdvGrid;

type
  TForm1 = class(TForm)
    AdvStringGrid1: TAdvStringGrid;
    procedure FormCreate(Sender: TObject);
    procedure AdvStringGrid1CellBalloon(Sender: TObject; ACol, ARow: Integer; var ATitle, AText: string; var AIcon: Integer);
  private
  public
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}


procedure TForm1.FormCreate(Sender: TObject);
begin
  AdvStringGrid1.Balloon.Enable := True;
end;

procedure TForm1.AdvStringGrid1CellBalloon(Sender: TObject; ACol, ARow: Integer; var ATitle, AText: string; var AIcon: Integer);
begin
  if ACol = 1 then
  begin
    AText := 'Text';
    ATitle := 'Title';
  end
  else
  begin
    AText := '';
    ATitle := '';
  end;
end;

end.

We traced & solved this issue.
The next update will address this.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.