ui.setstringattributes.pkg
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PKG 代码 · 共 185 行
PKG
185 行
<?xml version="1.0" encoding="iso-8859-1" ?>
<!-- $Revision: 1.4 $ -->
<refentry id="{@id}">
<refnamediv>
<refname><function>HTML_Progress_UI::setStringAttributes</function></refname>
<refpurpose>sets the look and feel of the progress meter string</refpurpose>
</refnamediv>
<refsect1 id="{@id synopsis}">
<title>Synopsis</title>
<refsynopsisdiv>
<refsynopsisdivinfo>
<funcsynopsis>
<funcsynopsisinfo>
require_once 'HTML/Progress/UI.php';
</funcsynopsisinfo>
<funcprototype>
<funcdef>void <function>HTML_Progress_UI::setStringAttributes</function></funcdef>
<paramdef>mixed <parameter>$attributes</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdivinfo>
</refsynopsisdiv>
</refsect1>
<refsect1 id="{@id description}">
<title>Description</title>
<para>
This method is used to give a look and feel, such as alignment, size and color,
to the progress meter string.
</para>
<para>
<emphasis>$attributes</emphasis> is an associative array or string of HTML tag attributes.
</para>
</refsect1>
<refsect1 id="{@id parameter}">
<title>Parameter</title>
<para>
<variablelist>
<varlistentry>
<term>
<type>mixed</type>
<parameter>$attributes</parameter>
</term>
<listitem>
<para>
the new string attributes of the progress meter.
</para>
<para>
<table frame="all">
<title>Key-values allowed are:</title>
<tgroup cols="3">
<thead align="center">
<row>
<entry><emphasis>Attribute</emphasis></entry>
<entry><emphasis>Format</emphasis></entry>
<entry><emphasis>Default value</emphasis></entry>
</row>
</thead>
<tbody>
<row>
<entry>id </entry>
<entry>string </entry>
<entry>installationProgress </entry>
</row>
<row>
<entry>width </entry>
<entry>integer </entry>
<entry>50 </entry>
</row>
<row>
<entry>font-family </entry>
<entry>string </entry>
<entry>Verdana, Arial, Helvetica, sans-serif </entry>
</row>
<row>
<entry>font-size </entry>
<entry>integer </entry>
<entry>12 </entry>
</row>
<row>
<entry>color </entry>
<entry>string </entry>
<entry>#000000 </entry>
</row>
<row>
<entry>background-color </entry>
<entry>string </entry>
<entry>#FFFFFF </entry>
</row>
<row>
<entry>align </entry>
<entry>string </entry>
<entry>right </entry>
</row>
<row>
<entry>valign </entry>
<entry>string </entry>
<entry>HB=right, VB=bottom (HB:Horizontal Bar, VB:Vertical Bar)</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 id="{@id note}">
<title>Note</title>
<simpara>
( HTML_Progress >= 1.0 )
</simpara>
<para>
<important>
This function can not be called statically.
</important>
</para>
<para>
<tip>
You may also used an existing StyleSheet and a CSS class-selector with pre-defined style.
For example:
<para>
<programlisting role="php">
<![CDATA[
<?php
require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
// specify a user-ident (instead of the auto-generated value)
$bar->setIdent('myPB');
$bar->setStringPainted(true);
$ui =& $bar->getUI();
$ui->setStringAttributes('id="myPBstring"');
?>
]]>
</programlisting>
could be replaced by:
<screen>
<style type="text/css">
<!--
.myPB .myPBstring { width: 100px; background-color: lightyellow; color: black; }
// -->
</style>
</screen>
</para>
<para>
<graphic fileref="../media/screenshots/string1.png"></graphic>
</para>
</tip>
</para>
</refsect1>
<refsect1 id="{@id see}">
<title>See</title>
<para>
{@tutorial ui.getstringattributes.pkg},
{@tutorial progress.setstringpainted.pkg}
</para>
</refsect1>
<refsect1 id="{@id example}">
<title>Example</title>
<para>
<simpara>
Example below will produced a progress bar with a custom style string.
It's a static example, the progress bar will not run.
</simpara>
<figure>
<graphic fileref="../media/screenshots/redsandback.png"></graphic>
</figure>
<example>
{@example setstringattributes.php}
</example>
</para>
</refsect1>
</refentry>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?