
! script name: datatable.d/hlinestoggle
! topic: toggle table grid horizontal lines on/off

!A
!A NAME:
!A
!A 	Horizontal Lines Toggle
!A
!A DESCRIPTION:
!A
!A	This script allows the horizontal grid lines of a table to be toggled
!A 	on/off.
!A
!B INSTRUCTIONS:
!B
!B	PICK TABLE: Pick the table to have the horizontal grid lines turned
!B 		on/off.
!B
!# see also - htdocs/help.d/datatables.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: horizontal lines On/off ")

DIM Answer$[256]
DIM A$[256]
DIM Destination$[256]
DEG

ActivateUndo
Start:!
Pick_table:stat= SetInputFormat("n4","")
Element1=PickEntity("PICK TABLE")
IF (ExitScript(Destination$)) THEN Leave
IF NOT  ValidGeometry(Element1) THEN Pick_table


ActivateUndo
Stat= AdvanceUndoNumber("grid lines")
Stat= AddItemToUndo(WsUBModifyMode,Element1)

Stat= EraseEntity(Element1)
Stat=SetTableHLines(Element1)
Stat= PlotEntity(Element1)

GOTO Start

Leave:!
stat= SetInputFormat("n4","")
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
