Hi Snorry,
You are right we are missing a title() function in fglsvgcanvas.4gl library.
We will review this, thanks for the suggestion!
Quick workaround:
You need om.DomDocument.createChars() to create the text element for the title node, but the om.DomDocument object used by fglsvgcanvas is not exposed so you have to add this function in the lib:
FUNCTION getDocument()
CALL _check_canvas_id(current_canvas)
RETURN canvases[current_canvas].document
END FUNCTION
Then you can build the title node as follows:
DEFINE doc om.DomDocument
DEFINE g, t, tt om.DomNode
...
LET g = fglsvgcanvas.g( "clock" )
LET t = fglsvgcanvas.createElement("title",101)
LET doc = fglsvgcanvas.getDocument()
LET tt = doc.createChars("The text to be displayed")
CALL t.appendChild( tt )
CALL g.appendChild( t )
...
Seb