Tcldot and HTML-like labels


Is it possible to set HTML-like labels using Tcldot? I've tried to use constructs like:

  $g addnode "N" label "<TABLE>...</TABLE>"
  $g addnode "N" label "<<TABLE>...</TABLE>>"

If it's not possible, is this something that might be added soon?


Re: Tcldot and HTML-like labels

I would have expected #2 to work, but I agree that it doesn't.  I will investigate...

Meanwhile, if you can use gv instead, this works ok:



package require gv

set G [gv::digraph G]

set n1 [gv::node $G foo]
set n2 [gv::node $G bar]
set e1 [gv::edge $n1 $n2]

gv::setv $n1 label {<<table><tr><td>f o o</td><td>b a r</td></tr></table>>}

gv::layout $G dot
gv::render $G xlib




I've put in a fix for this, please try tomorrow after tonight's build.

I tested with:



package require Tcldot

set g [dotnew digraph]

set n1 [$g addnode]
set n2 [$g addnode]
set e1 [$g addedge $n1 $n2]

$n1 setattributes label "<<table><tr><td>f o o</td><td>b a r</td></tr></table>>"

$g layout DOT
$g write stdout



That works well here. Thanks

That works well here.

Thanks for the quick fix!


Recent comments