Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

TElXTree: Cell hints required; e.g OnGetCellHint(...)

.GetCellHint(Sender: TObject; ARow, ACol: Integer; var hintstr: String);

This would allow me to specify a hint.

However, I would use this to set a MouseHint using TElMouseHint (a component which I specified, requested, and helped improve and debug).

  if    (ARow in [1,2])
    and (ACol > 0) then
  begin
    if IncludedCells[ARow,ACol] then
    begin
      s :=  '<p align=center><FONT NAME=''Times New Roman''><FONT SIZE=20  <b><u>Statistics for ' + Format('%d x %d', [ARow, ACol]) + '</u></b></FONT></p> '

          + '<FONT NAME=''Courier''><FONT SIZE=14>'
         ...
      s := s + '</FONT>';

      with MouseHint do
      begin
        Caption := s;

        ShowHint();
      end;
    end
    else // not an Included Cell
    begin
      MouseHint.Active := False;
    end;
  end
  else // Headings
  begin
    MouseHint.Active := False;
  end;

Essentially, I need to be able to show individual cell hints the are based on the value of the contents of the ItemAt(X, Y, ...), where X and Y are the visual row and column cell coordinates.

As the mouse Enters a cell the MouseHint is set (to a value I specify, not necessarily the contents of the cell), and as the mouse Exits a cell, the MouseHint is turned off.

If there is a way of doing this already, please let me know.

Raymond

Comments

Sign In or Register to comment.