
! script name: datatable.d/entryunderline
! topic: entry text underline toggle

!A
!A NAME:
!A
!A 	Underline Toggle
!A
!A DESCRIPTION:
!A
!A 	This script turns on/off the entry text underline toggle.
!A
!B INSTRUCTIONS:
!B
!B 	PICK ENTRY: Pick the entry to be underlined.
!B
!# see also - htdocs/help.d/datatables.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: Underline toggle ")

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

ActivateUndo
Start:!


Element_loop:!
stat= SetInputFormat("n4","")
Element1=PickEntity("PICK ENTRY ")
IF (ExitScript(Destination$)) THEN Leave
IF NOT ValidGeometry(Element1) THEN Element_loop
T1= LastPickPara

R1=TableParaRow(Element1,T1)
C1=TableParaColumn(Element1,T1)

ActivateUndo
Stat= AdvanceUndoNumber("text underline")
Stat= AddItemToUndo(WsUBModifyMode,Element1)

Stat= PlotDataTable(Element1,R1,C1,-1)
Stat= SetEntryUnderLine(Element1,R1,C1)
Stat= PlotDataTable(Element1,R1,C1,0)

GOTO Element_loop

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