MCPcopy Index your code
hub / github.com/rawpython/remi / main

Method main

examples/widgets_overview_app.py:28–163  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26 self.progress.set_value(self.count%100)
27
28 def main(self):
29 # the margin 0px auto centers the main container
30 verticalContainer = gui.Container(width=540, margin='0px auto', style={'display': 'block', 'overflow': 'hidden'})
31
32 horizontalContainer = gui.Container(width='100%', layout_orientation=gui.Container.LAYOUT_HORIZONTAL, margin='0px', style={'display': 'block', 'overflow': 'auto'})
33
34 subContainerLeft = gui.Container(width=320, style={'display': 'block', 'overflow': 'auto', 'text-align': 'center'})
35 self.img = gui.Image('/res:logo.png', height=100, margin='10px')
36 self.img.onclick.do(self.on_img_clicked)
37
38 self.table = gui.Table.new_from_list([('ID', 'First Name', 'Last Name'),
39 ('101', 'Danny', 'Young'),
40 ('102', 'Christine', 'Holand'),
41 ('103', 'Lars', 'Gordon'),
42 ('104', 'Roberto', 'Robitaille'),
43 ('105', 'Maria', 'Papadopoulos')], width=300, height=200, margin='10px')
44 self.table.on_table_row_click.do(self.on_table_row_click)
45
46 # the arguments are width - height - layoutOrientationOrizontal
47 subContainerRight = gui.Container(style={'width': '220px', 'display': 'block', 'overflow': 'auto', 'text-align': 'center'})
48 self.count = 0
49 self.counter = gui.Label('', width=200, height=30, margin='10px')
50
51 self.lbl = gui.Label('This is a LABEL!', width=200, height=30, margin='10px')
52
53 self.bt = gui.Button('Press me!', width=200, height=30, margin='10px')
54 # setting the listener for the onclick event of the button
55 self.bt.onclick.do(self.on_button_pressed)
56
57 self.txt = gui.TextInput(width=200, height=30, margin='10px')
58 self.txt.set_text('This is a TEXTAREA')
59 self.txt.onchange.do(self.on_text_area_change)
60
61 self.spin = gui.SpinBox(1, 0, 100, width=200, height=30, margin='10px')
62 self.spin.onchange.do(self.on_spin_change)
63
64 self.progress = gui.Progress(1, 100, width=200, height=5)
65
66 self.check = gui.CheckBoxLabel('Label checkbox', True, width=200, height=30, margin='10px')
67 self.check.onchange.do(self.on_check_change)
68
69 self.btInputDiag = gui.Button('Open InputDialog', width=200, height=30, margin='10px')
70 self.btInputDiag.onclick.do(self.open_input_dialog)
71
72 self.btFileDiag = gui.Button('File Selection Dialog', width=200, height=30, margin='10px')
73 self.btFileDiag.onclick.do(self.open_fileselection_dialog)
74
75 self.btUploadFile = gui.FileUploader('./', width=200, height=30, margin='10px')
76 self.btUploadFile.onsuccess.do(self.fileupload_on_success)
77 self.btUploadFile.onfailed.do(self.fileupload_on_failed)
78
79 items = ('Danny Young','Christine Holand','Lars Gordon','Roberto Robitaille')
80 self.listView = gui.ListView.new_from_list(items, width=300, height=120, margin='10px')
81 self.listView.onselection.do(self.list_view_on_selected)
82
83 self.link = gui.Link("http://localhost:8081", "A link to here", width=200, height=30, margin='10px')
84
85 self.dropDown = gui.DropDown.new_from_list(('DropDownItem 0', 'DropDownItem 1'),

Callers

nothing calls this directly

Calls 9

appendMethod · 0.95
appendMethod · 0.95
appendMethod · 0.95
display_counterMethod · 0.95
doMethod · 0.45
new_from_listMethod · 0.45
set_textMethod · 0.45
select_by_valueMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected