Delphi 2007. WPTools v.5.51, Windows Vista
To change Indent (next level/prior level) and TabStop, I have this simple wrapper function that I call from user interface (menu item).
Procedure WPT_Set_TabStop(RTFMemo : TWPCustomRtfEdit; nTwips: Integer);
begin
RTFMemo.Header.DefaultTabStop := nTwips; {Tab Stop}
end ;
Problem:
Setting a different value for Header.DefaultTabStop (e.g., from 360 to 720 twips) does NOT seem to work consistently (at times it seems to work as expected, at other times, TabStop value does not change at all).
Is there another property that may be interfering or do I need to call some code to make this property take effect?
Note: When application starts, I am initializing page margins and default tab stop. This, of course, does not help the existing documents that already have the header info saved in file. So, I am trying to over-ride old header info in code as noted above.
I DO have to work with EXISTING documents (no choice) that need page margin and indents adjusted. So, I am trying to apply page margins (works fine) and default tab stop (not working fine :( ) to existing documents via menu items AFTER loading the document.
(To actually increase or decrease paragraph indent level, use code copied from: WPCtrRich...WPI_CO_NextLevel and WPI_CO_PriorLevel...from button.OnClick(). This works as expected.)
Thank You
JayM