(self, appInstance, **kwargs)
| 571 | |
| 572 | class WidgetCollection(gui.Container): |
| 573 | def __init__(self, appInstance, **kwargs): |
| 574 | self.appInstance = appInstance |
| 575 | super(WidgetCollection, self).__init__(**kwargs) |
| 576 | self.lblTitle = gui.Label("Widgets Toolbox", height=20) |
| 577 | self.lblTitle.add_class("DialogTitle") |
| 578 | self.widgetsContainer = gui.HBox(width='100%', height='calc(100% - 20px)') |
| 579 | self.widgetsContainer.style.update({'overflow-y': 'scroll', |
| 580 | 'overflow-x': 'hidden', |
| 581 | 'align-items': 'flex-start', |
| 582 | 'flex-wrap': 'wrap', |
| 583 | 'background-color': 'white'}) |
| 584 | |
| 585 | self.append([self.lblTitle, self.widgetsContainer]) |
| 586 | |
| 587 | # load all widgets |
| 588 | self.add_widget_to_collection(gui.HBox, width='250px', height='250px', style={ |
| 589 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 590 | self.add_widget_to_collection(gui.VBox, width='250px', height='250px', style={ |
| 591 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 592 | self.add_widget_to_collection(gui.Container, width='250px', height='250px', style={ |
| 593 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 594 | #self.add_widget_to_collection(gui.GridBox, width='250px', height='250px', style={'top':'20px', 'left':'20px', 'position':'absolute'}) |
| 595 | self.add_widget_to_collection(gui.Button, text="button", width='100px', height='30px', style={ |
| 596 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 597 | self.add_widget_to_collection(gui.TextInput, width='100px', height='30px', style={ |
| 598 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 599 | self.add_widget_to_collection(gui.Label, text="label", width='100px', height='30px', style={ |
| 600 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 601 | self.add_widget_to_collection(gui.ListView, width='100px', height='100px', style={ |
| 602 | 'top': '20px', 'left': '20px', 'position': 'absolute', 'border': '1px solid lightgray'}) |
| 603 | self.add_widget_to_collection(gui.ListItem, text='list item') |
| 604 | self.add_widget_to_collection(gui.DropDown, width='100px', height='30px', style={ |
| 605 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 606 | self.add_widget_to_collection(gui.DropDownItem, text='drop down item') |
| 607 | self.add_widget_to_collection(gui.Image, width='100px', height='100px', style={ |
| 608 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 609 | self.add_widget_to_collection(gui.CheckBoxLabel, text='check box label', width='100px', height='30px', style={ |
| 610 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 611 | self.add_widget_to_collection(gui.CheckBox, width='30px', height='30px', style={ |
| 612 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 613 | self.add_widget_to_collection(gui.SpinBox, width='100px', height='30px', style={ |
| 614 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 615 | self.add_widget_to_collection(gui.Slider, width='100px', height='30px', style={ |
| 616 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 617 | self.add_widget_to_collection(gui.ColorPicker, width='100px', height='30px', style={ |
| 618 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 619 | self.add_widget_to_collection(gui.Date, width='100px', height='30px', style={ |
| 620 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 621 | self.add_widget_to_collection(gui.Link, text='link', url='', width='100px', height='30px', style={ |
| 622 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 623 | self.add_widget_to_collection(gui.Progress, value=0, _max=100, width='130px', height='30px', style={ |
| 624 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 625 | self.add_widget_to_collection(gui.FileFolderNavigator, width=100, height=100, style = { |
| 626 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 627 | #self.add_widget_to_collection(gui.VideoPlayer, width='100px', height='100px', style={ |
| 628 | # 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
| 629 | self.add_widget_to_collection(gui.TableWidget, width='100px', height='100px', style={ |
| 630 | 'top': '20px', 'left': '20px', 'position': 'absolute'}) |
nothing calls this directly
no test coverage detected