Last active
September 14, 2022 09:14
-
-
Save Dayof/c2fc5883c8884d61ca02109dc7944813 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import toga | |
from colosseum import CSS | |
class StartApp(toga.App): | |
def startup(self): | |
self.main_window = toga.MainWindow(self.name) | |
self.main_window.app = self | |
self.outer_box = toga.Box() | |
all_tests_box = toga.Tree(['Tests']) | |
problems_box = toga.Tree(['Problems']) | |
self.notebook = toga.OptionContainer(content=[ | |
('All tests', all_tests_box), | |
('Problems', problems_box)]) | |
self.button = toga.Button('Print ID', on_press=self.printCurrentID, | |
style=CSS(margin=50)) | |
self.outer_box.add(self.notebook) | |
self.outer_box.add(self.button) | |
self.main_window.content = self.outer_box | |
self.main_window.show() | |
def printCurrentID(self, button): | |
print(self.notebook.selected['id']) | |
def main(): | |
app = StartApp('ProgressBar Test', 'org.pybee.test') | |
app.main_loop() | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! I want to use the
optioinCintainer
widget to add tab views to my app, when I typebriefcase dev
, it works fine on Windows systems, but after I typebriefcase package android
, and install it on my android phone and open it, there is nothing appeare on my screen but a title of the app...How could this happen? Is there something wrong? How can I add tab views to my android app?