In my Beeware app
I am trying to use the Selection widget
according to https://toga.readthedocs.io/en/latest/reference/api/widgets/selection.html setting the value of the the font_size
parameter. To test it I use the simple script attached below. The widget works correctly, but the font size remains small and is not affected
no matter what value I set. Any suggestion or hint how to make it work will be much appreciated
import toga
from toga.style import Pack
from toga.style.pack import COLUMN, ROW
class HelloWorld(toga.App):
def startup(self):
self.selection=toga.Selection(style=Pack(font_size=30),\
items=["title", "message","sound"],on_select=self.func1)
main_box = toga.Box(style=Pack(direction=COLUMN))
main_box.add(self.selection)
self.main_window = toga.MainWindow(title=self.formal_name)
self.main_window.content = main_box
def func1(self,widget):
print(self.selection.value)
return
def main():
return HelloWorld()