This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

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

edited September 2013 in Feature Requests
.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

  • Amendment:

    .GetCellHint(Sender: TObject; ARow, ACol: Integer; var hintstr: String); should get the Item too, and perhaps not ARow.

    This requires some thought.

    Raymond
Sign In or Register to comment.