[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ns] change the color of a dynamic link that is DOWN



The simplest solution is:

- go to ~nam/netmodel.cc, grep for "DOWN", change that "red" stuff to
"background". Also go to the handling of "UP" immediately below and change
that "red" to "background". Recompile and there you should go.

Or, put these in a file, say, a.tcl, then do nam -f a.tcl abc.nam:

Animator instproc link-up {now src dst} {
        $self sim_annotation $now link($src:$dst) up
        $self instvar netModel
        $netModel ecolor $src $dst black
}

Animator instproc link-down {now src dst} {
        $self sim_annotation $now link($src:$dst) down
        $self instvar netModel
        $netModel ecolor $src $dst background
}

Let me know if this doesn't work.

- Haobo

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Sjoerd Janssen
> Sent: Wednesday, May 03, 2000 11:46 PM
> To: ns-users
> Subject: [ns] change the color of a dynamic link that is DOWN
>
>
> Hi,
>
> I have a question regarding link colors.
>
> I know it is possible to give a link a color. When such a link goes
> DOWN, the color goes to 'red' by default. Is there a way to change this.
> I would like to give a link that is DOWN a color equal to the background
> used in NAM such that the link doesn't appear to be there and suddenly
> 'pops up' when the link goes UP.
>
> regards, Sjoerd Janssen.
>
>
>
>