(self)
| 32 | pass |
| 33 | |
| 34 | def main(self): |
| 35 | #custom additional html head tags |
| 36 | my_html_head = """ |
| 37 | """ |
| 38 | |
| 39 | #custom css |
| 40 | my_css_head = """ |
| 41 | <link rel="stylesheet" href="" type="text/css"> |
| 42 | """ |
| 43 | |
| 44 | #custom js |
| 45 | my_js_head = """ |
| 46 | <script></script> |
| 47 | """ |
| 48 | #appending elements to page header |
| 49 | self.page.children['head'].add_child('myhtml', my_html_head) |
| 50 | self.page.children['head'].add_child('mycss', my_css_head) |
| 51 | self.page.children['head'].add_child('myjs', my_js_head) |
| 52 | |
| 53 | #setting up the application icon |
| 54 | self.page.children['head'].set_icon_file("/res:icon.png") |
| 55 | |
| 56 | #eventually set up body attributes/style |
| 57 | #self.page.children['body'].style['background-color'] = 'lightyellow' |
| 58 | #eventually set up body event listeners |
| 59 | #self.page.children['body'].onkeydown.do(self.onkeydown) |
| 60 | |
| 61 | #creating a container VBox type, vertical (you can use also HBox or Widget) |
| 62 | main_container = gui.VBox(width=300, height=200, style={'margin':'0px auto'}) |
| 63 | |
| 64 | # returning the root widget |
| 65 | return main_container |
| 66 | |
| 67 | def on_close(self): |
| 68 | """ Overloading App.on_close event allows to perform some |
nothing calls this directly
no test coverage detected