Args: kwargs: See Widget.__init__()
(self, db_index=-1, byte_index=-1, *args, **kwargs)
| 468 | def text(self, value): self.set_text(value) |
| 469 | |
| 470 | def __init__(self, db_index=-1, byte_index=-1, *args, **kwargs): |
| 471 | """ |
| 472 | Args: |
| 473 | kwargs: See Widget.__init__() |
| 474 | """ |
| 475 | default_style = {'position':'absolute','left':'10px','top':'10px'} |
| 476 | default_style.update(kwargs.get('style',{})) |
| 477 | kwargs['style'] = default_style |
| 478 | kwargs['width'] = kwargs['style'].get('width', kwargs.get('width','100px')) |
| 479 | kwargs['height'] = kwargs['style'].get('height', kwargs.get('height','30px')) |
| 480 | super(ByteViewWidget, self).__init__(*args, **kwargs) |
| 481 | SiemensWidget._setup(self) |
| 482 | self.db_index = db_index |
| 483 | self.byte_index = byte_index |
| 484 | |
| 485 | def update(self, *args): |
| 486 | if self.plc_instance==None: |