Page 1 of 1

how to put a Fon in Strikethrough

Posted: Wed Jul 11, 2018 6:35 am
by digitsoft
hello Roger
You can tell me how to put a Fon in Strikethrough
Thank you.

Re: how to put a Fon in Strikethrough

Posted: Wed Jul 11, 2018 9:06 am
by rdonnay
I don't know how to do this in Xbase parts using standard fonts.

If you want to display some text in a window you could use DCHTMLWINDOW and use the <strike> tag in the HTML.

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

bHtml := {||MyHtml(oHtml)}
@ 0,0 DCHTMLWINDOW bHtml OBJECT oHtml SIZE 800,600 PIXEL ;
   RESIZE DCGUI_RESIZE_RESIZEONLY

@ 620,0 DCPUSHBUTTON CAPTION 'New HTML' SIZE 100,25 PIXEL ;
   ACTION {||DC_GetRefresh(GetList)}

DCGETOPTIONS RESIZE

DCREAD GUI FIT TITLE 'HTML Window' OPTIONS GetOptions

RETURN nil
* ----------
STATIC FUNCTION MyHtml( oHtml )

LOCAL cHtml
PRIVATE cTime := Time()

TEXT INTO cHtml
<html>
<body>
<h1>Hello New world!</h1>
<h2>The time is now &cTime</h2>
Don't look to the <strike>passed</strike> past.  <strike>Selebrate</strike> Celebrate the present.
</body>
</html>
ENDTEXT

RETURN cHtml

Re: how to put a Fon in Strikethrough

Posted: Wed Jul 11, 2018 10:13 am
by digitsoft
thanks roger

rdonnay wrote:I don't know how to do this in Xbase parts using standard fonts.

If you want to display some text in a window you could use DCHTMLWINDOW and use the <strike> tag in the HTML.

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

bHtml := {||MyHtml(oHtml)}
@ 0,0 DCHTMLWINDOW bHtml OBJECT oHtml SIZE 800,600 PIXEL ;
   RESIZE DCGUI_RESIZE_RESIZEONLY

@ 620,0 DCPUSHBUTTON CAPTION 'New HTML' SIZE 100,25 PIXEL ;
   ACTION {||DC_GetRefresh(GetList)}

DCGETOPTIONS RESIZE

DCREAD GUI FIT TITLE 'HTML Window' OPTIONS GetOptions

RETURN nil
* ----------
STATIC FUNCTION MyHtml( oHtml )

LOCAL cHtml
PRIVATE cTime := Time()

TEXT INTO cHtml
<html>
<body>
<h1>Hello New world!</h1>
<h2>The time is now &cTime</h2>
Don't look to the <strike>passed</strike> past.  <strike>Selebrate</strike> Celebrate the present.
</body>
</html>
ENDTEXT

RETURN cHtml