[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/demos/quickstart/protected/pages/Controls/ -> TextHighlighter.page (source)

   1  <com:TContent ID="body" >
   2  
   3  <h1 id="4601">TTextHighlighter</h1>
   4  <com:DocLink ClassPath="System.Web.UI.WebControls.TTextHighlighter" />
   5  
   6  <p>
   7  <tt>TTextHighlighter</tt> does syntax highlighting for its body content, including both static text and the rendering results of its child controls. The text being highlighted follows the syntax of the specified <tt>Language</tt>, which can be 'php' (default), 'prado', 'css', 'html', etc. Here, 'prado' stands for the syntax of PRADO control templates.
   8  </p>
   9  <p>
  10  If line numbers are desired in front of each line, set <tt>ShowLineNumbers</tt> to true.
  11  </p>
  12  <p>
  13  To use <tt>TTextHighlighter</tt>, simply enclose the contents to be syntax highlighted within the body of a <tt>TTextHighlighter</tt> control. The following example highlights a piece of PHP code,
  14  </p>
  15  <com:TTextHighlighter Language="prado" CssClass="source">
  16  &lt;com:TTextHighlighter ShowLineNumbers="true"&gt;
  17  <?php
  18  $str = 'one|two|three|four';
  19  print_r(explode('|', $str, 2)); // will output an array
  20  ?>
  21  &lt;/com:TTextHighlighter&gt;
  22  </com:TTextHighlighter>
  23  
  24  <com:RunBar PagePath="Controls.Samples.TTextHighlighter.Home" />
  25  
  26  </com:TContent>


Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7