Howdy, Stranger!

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

In this Discussion

TElXTree: Printing values for a CheckBox column - How without displaying the value?

There is a column in the ElXTree designated as Custom, and it has 
    UseOwnStyle     := True;
    Style.Control   := TElXCellCheckBox.Create();

    TElXCellCheckBox(Style.Control).Alignment := taCenter;

    with TElXCellCheckBox(Control) do
    begin
      AllowGrayed := False;
    end;

Captions are not used, so there is no visible text.

However, when printed, the cell should display T/F or Y/N or Yes/No, etc.

Is it possible to do this printing without having the values T/F visible in the main tree?

If so, what is a good way of doing it?

Thanks.
Raymond

Comments

  • 3 Comments sorted by Votes Date Added
  • Found one way.

    In TElXTree Printer's OnItemPrinting(...) event: 

      with Item do
      begin
        with TElXCellCheckBox(Cells[10].Control) do
        begin
          if Checked then
          begin
            Cells[10].Text := 'T';
          end
          else // not Checked
          begin
            Cells[10].Text := '';
          end;
        end;
      end;

    Raymond
  • This is a possible sensible way
Sign In or Register to comment.