Total Pageviews

Saturday, May 31, 2014

នេះជា Type ProgressViewWidget របស់ Corona SDK

នេះជា Type ProgressViewWidget របស់ Corona SDK
សំរាប់ ProgressView objects ត្រូវបានបង្កើតឡើងដោយប្រើ widget.newProgressView()
នេះជា Methods របស់វាះ
Methods
(Inherits methods from GroupObject)
object:setProgress()
ប្រើសំរាប់បញ្ចូលនៅ current progress របស់ ProgressView
Syntax: object:setProgress (progress)
Progress(តំរូវការ) វាជាចំនួនលេខដែល progress (percentage) ដែលត្រូវបញ្ចូលទៅកាន់ progress view។ តំលៃនេះត្រូវតែនៅចន្លោះ ០.០ (empty) and 1.0 (100%)
សូមមើលកូដះ
--set the progress to 50%
progressView:setProgress (0.5)

object:getProgress()
ប្រើសំរាប់ត្រឡប់នៅ current progress value របស់ progressView
Syntax: object:getProgress()
សូមមើលកូដះ
Local curretProgress = progressView:getProgress()

object:resizeView()
ប្រើសំរាប់ resizes នៅ Width of a progressView បន្ទាប់ពីការបង្កើត
Syntax: object:resizeView (newWidth)
newWidth (តំរូវការ) វាជាចំនួនលេខដែលជា new width of the progress view
សូមមើលកូដះ
--resize to 200 pixels
progressView:resizeView (200)



No comments:

Post a Comment