Package pyforms :: Package web :: Package Controls :: Module ControlProgress |
[hide private]
[frames] | no frames]

# Source Code for Module pyforms.web.Controls.ControlProgress

     1  from pyforms.web.Controls.ControlBase import ControlBase
     2  import pyforms.Utils.tools as tools
     3
     4
     5 -class ControlProgress(ControlBase):
     6
     7      _min = 0
     8      _max = 100
     9
    10 -    def __init__(self, label = "%p%", defaultValue = 0, min = 0, max = 100):
    11          self._updateSlider = True
    12          self._min = min
    13          self._max = max
    14          ControlBase.__init__(self, label, defaultValue)
    15
    16 -    def initControl(self): return "controls.push(new ControlProgress('"+self._name+"','%s'));" %  self.help
    17
    18      @property
    19 -    def value(self): return self._value
    20      @value.setter
    21 -    def value(self, value): self._value = value
    22
    23      @property
    24 -    def min(self): return self._min
    25      @min.setter
    26 -    def min(self, value): self._min = value
    27
    28      @property
    29 -    def max(self): return self._max
    30      @max.setter
    31 -    def max(self, value): self._max = value
    32