當前位置: 首頁>>代碼示例>>PHP>>正文


PHP HTML_Progress::setUI方法代碼示例

本文整理匯總了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 {
開發者ID:GeekyNinja,項目名稱:LifesavingCAD,代碼行數:31,代碼來源:function_callback.php

示例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 
開發者ID:Ogwang,項目名稱:sainp,代碼行數:31,代碼來源:method_callback.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);
開發者ID:Esleelkartea,項目名稱:kz-adeada-talleres-electricos-,代碼行數:18,代碼來源:setui.php


注:本文中的HTML_Progress::setUI方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。