CommonCtrl.progressbar
a progress bar control
| Title |
a progress bar control |
| Author(s) |
LiXizhi |
| Date |
2007/4/6 |
| File |
script/ide/progressbar.lua |
Description
Member Functions
progressbar:new
common control library
NPL.load("(gl)script/ide/common_control.lua");
define a new control in the common control libary
default member attributes
local progressbar = {
-- the top level control name
name = "progressbar1",
-- normal window size
alignment = "_lt",
left = 0,
top = 0,
width = 300,
height = 24,
parent = nil,
-- properties
Minimum = 0, -- The Maximum and Minimum properties define the range of values to represent the progress of a task
Maximum = 100,
Value = 0, -- represents the progress that the application has made toward completing the operation
Step = 10,
Style = "Blocks",
-- how many pixel to display for the first block.
miniblockwidth = 21,
-- appearance
container_bg = nil,-- background texture
block_bg = "Texture/whitedot.png", -- texture of the progress blocks
block_color = "0 255 0", -- the color of the blocks used for displaying the progress bar
-- string or function (step) end, where step is (0-1]
onstep = nil,
lastStep = 0,
}
CommonCtrl.progressbar = progressbar;
constructor
syntax
function progressbar:new (o)
parameters
progressbar:Destroy
Destroy the UI control
syntax
function progressbar:Destroy ()
progressbar:Show
- param bShow : boolean to show or hide. if nil, it will toggle current setting.
syntax
function progressbar:Show(bShow)
parameters
| bShow |
boolean to show or hide. if nil, it will toggle current setting. |
progressbar:PerformStep
public: Advances the current position of the progress bar by the amount of the Step property.
syntax
function progressbar:PerformStep()
progressbar:Increment
public: Advances the current position of the progress bar by the specified amount.
syntax
function progressbar:Increment(deltaValue)
parameters
progressbar:SetValue
public: set the current progress
syntax
function progressbar:SetValue(Value)
parameters
Topic revision: r1 - 2008-02-29 - 15:26:12 -
LiXizhi