本文整理匯總了PHP中HTML_Progress::setUI方法的典型用法代碼示例。如果您正苦於以下問題:PHP HTML_Progress::setUI方法的具體用法?PHP HTML_Progress::setUI怎麽用?PHP HTML_Progress::setUI使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類HTML_Progress
的用法示例。
在下文中一共展示了HTML_Progress::setUI方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
we swap from indeterminate mode to determinate mode
and run a standard progress bar from 0 to 100%
*/
if ($progressValue == 60) {
$bar->setIndeterminate(false);
$bar->setString(null);
// show percent-info
$bar->setValue(0);
}
}
}
$monitor = new HTML_Progress_Monitor('frmMonitor4', array('button' => array('style' => 'width:80px;')));
$monitor->setProgressHandler('myFunctionHandler');
$progress = new HTML_Progress();
$progress->setAnimSpeed(20);
$progress->setUI('Progress_ITDynamic');
// Attach a progress ui-model
$progress->setStringPainted(true);
// get space for the string
$progress->setString("");
// but don't paint it
$progress->setIndeterminate(true);
// Progress start in indeterminate mode
$monitor->setProgressElement($progress);
?>
<html>
<head>
<title>ProgressBar Monitor - Default renderer </title>
<style type="text/css">
<!--
body {
示例2: myMethodHandler
* @ignore
*/
class myClassHandler
{
function myMethodHandler($progressValue, &$bar)
{
if (fmod($progressValue, 10) == 0) {
echo "myMethodHandler -> progress value is = {$progressValue} <br/>\n";
}
$bar->sleep();
}
}
$obs = new myClassHandler();
$monitor = new HTML_Progress_Monitor('frmMonitor3', array('button' => array('style' => 'width:80px;')));
$progress = new HTML_Progress();
$progress->setUI('Progress_Default2');
// Attach a progress ui-model
$progress->setAnimSpeed(20);
$progress->setProgressHandler(array(&$obs, 'myMethodHandler'));
$monitor->setProgressElement($progress);
?>
<html>
<head>
<title>ProgressBar Monitor - Default renderer </title>
<style type="text/css">
<!--
.progressStatus {
color:#000000;
font-size:10px;
}
<?php
示例3:
<?php
require_once 'HTML/Progress.php';
class Progress_ITDynamic extends HTML_Progress_UI
{
function Progress_ITDynamic()
{
parent::HTML_Progress_UI();
$this->setCellCount(20);
$this->setProgressAttributes('background-color=#EEE');
$this->setStringAttributes('background-color=#EEE color=navy');
$this->setCellAttributes('inactive-color=#FFF active-color=#444444');
}
}
$bar = new HTML_Progress();
$bar->setUI('Progress_ITDynamic');
$ui =& $bar->getUI();
print_r($ui);