summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar')
-rw-r--r--demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.page12
-rw-r--r--demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.php10
2 files changed, 22 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.page b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.page
index 63436516..9a6b2ff2 100644
--- a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.page
+++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.page
@@ -50,6 +50,18 @@ Undefined progresbar, value changed from javascript:
</com:TClientScript/>
</td></tr>
+<tr><td class="samplenote">
+Default options, Max=100, Value=50, value changed during callback:
+</td><td class="sampleaction">
+ <com:TJuiProgressbar
+ ID="pbar2"
+ Options.Max="100"
+ Options.Value="50"
+ />
+ <com:TActiveButton ID="button2" Text="-10" OnClick="pbar2_minus" />
+ <com:TActiveButton ID="button3" Text="+10" OnClick="pbar2_plus" />
+</td></tr>
+
</table>
</com:TContent>
diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.php b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.php
index 8f6d9ec6..247b88c8 100644
--- a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.php
+++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.php
@@ -11,4 +11,14 @@ class Home extends TPage
{
$this->label1->Text="Progressbar changed.";
}
+
+ public function pbar2_minus($sender,$param)
+ {
+ $this->pbar2->getOptions()->value = max(0, $this->pbar2->getOptions()->value - 10);
+ }
+
+ public function pbar2_plus($sender,$param)
+ {
+ $this->pbar2->getOptions()->value = min($this->pbar2->getOptions()->max, $this->pbar2->getOptions()->value + 10);
+ }
} \ No newline at end of file