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: Printing values for a CheckBox column - How without displaying the value?

edited September 2013 in LMD ElPack
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

  • 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.