diff options
author | Jens Klaer <kj.landwehr.software@gmail.com> | 2015-05-20 15:56:09 +0200 |
---|---|---|
committer | Jens Klaer <kj.landwehr.software@gmail.com> | 2015-05-20 15:56:09 +0200 |
commit | 55338f1cf947b8593a3e23094d6feab625370e28 (patch) | |
tree | e8d714ed8afad949c9e3ee93cf1fcc0602d92b36 /demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar | |
parent | 0fb75d64f8dbcc98b4c06e7556125b94bf612819 (diff) |
extended quichstart tutorial for TJuiControl option changes during callback
Diffstat (limited to 'demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar')
-rw-r--r-- | demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.page | 12 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.php | 10 |
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 |