Write Pro Delete Tab?

In Write Classic there is a command “WR DELETE TAB”. How does one delete tabs in Write Pro under program control?

Tom Benedict

Hi Tom

There is no such command to delete tabs and there will not be.
What , Why ? :^)

easy:

The principle is to get tabs positions (as arrays or collection of objects) for a specific paragraph (wp get attributes) then set them again on the same paragraph, with more or less (even zero) elements in the arrays or the collection of objects.

Makes sense ?

best regards

Roland Lannuzel

Thanks for the response Roland.

Makes sense ?

Maybe…

So if I pass empty arrays will all the tabs be cleared?

	ARRAY REAL($arOffsets;0)
	ARRAY LONGINT($alTypes;0)
	ARRAY TEXT($atLeadingChars;0)

	WP SET ATTRIBUTES($WPObject;wk tab stop offsets;$arOffsets)
	WP SET ATTRIBUTES($WPObject;wk tab stop types;$alTypes)
	WP SET ATTRIBUTES($WPObject;wk tab stop leadings;$atLeadingChars)

Tom Benedict

hello,

In this case, better use “wp reset attributes”, but the result should be the same :slight_smile:

Roland Lannuzel

Thank you Roland.

Tom Benedict