sd*******@gmail.com wrote:
I would like to achieve an effect similar to the code outlining in
vs.net (where you can expand and collapse sections of code) inside of
a textarea in a web form.
the code outlining would be available on encountering certain reserve
words and have expand/collapse ability (just like in an IDE).
any suggestions of how to do this? would it require a different
"control" (i.e. not text area), specially if I wanted to add +/- signs?
I think you mean code folding ? I've done this for Perl, but it required
span'ing everything (which was needed for syntax hilighting anyway).
I've tried using the list trick in the past, but large linecounts
caused some odd behaviors in (IIRC) FF 1.5 (or maybe IE6 ?). I've also
considered hacking a table, and adding/removing rows.
Anyway, for an example, see
www.presicient.com/ppicf/CodeFolder.html.
(Note the line number alignment still has some issues on some browsers).
Regards,
Dean Arnold
Presicient Corp.