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.
ElXTreePrinter: tpoShowHiddenItems not working? and tpoShowInvisibleItems works like tpoShowHidden?
with ItemTreePrinter.TreePrintSettings do
begin
if IncludeHidden then
begin
TreePrintOptions := TreePrintOptions + [tpoShowHiddenItems, tpoShowInvisibleItems];
end
else // not IncludeHidden
begin
TreePrintOptions := TreePrintOptions - [tpoShowHiddenItems, tpoShowInvisibleItems];
end;
end;
I use this before calling Print() to render the pages to the ElPrinter.
I expected TreePrintOptions := TreePrintOptions - [tpoShowHiddenItems] to preclude Hidden items, but the hidden items were printed.
It was only when I removed tpoShowInvisibleItems that Hidden items were not previewed (or printed).
Either there is a bug or one of these options is superfluous.
Also, if one is to show hidden items, one must make them visible or test for them being hidden. Either way, only one option does the job.
Is this a bug? If so, please explain to me what these options mean; I couldn't find them in the Help.
Thanks.
Raymond

Comments
tpoShowHiddenItems overrides hiding items when FilteredVisibility is set to true. That is, if there are any items that are not shown because of their Hidden property is set to true and Tree's FilteredVisibility is set to true, then they will be printed if tpoShowHiddenItemsflag is set.