![見出し画像](https://assets.st-note.com/production/uploads/images/140677254/rectangle_large_type_2_4a1d1b198c5d64d7ac29cb9db0a9c70b.jpeg?width=1200)
PySimpleGUIのテーマのリスト
(Python学習初心者の試行錯誤・備忘録です)
の中で、PySimpleGUIのテーマを切り替えられるようにした際、
#表示テーマ
themelist=['LightGreen','Black', 'BlueMono', 'BluePurple', 'BrightColors', 'BrownBlue',
'Dark', 'Dark2', 'DarkAmber', 'DarkBlack', 'DarkBlack1', 'DarkBlue',
'DarkBlue1', 'DarkBlue10', 'DarkBlue11', 'DarkBlue12', 'DarkBlue13',
'DarkBlue14', 'DarkBlue15', 'DarkBlue16', 'DarkBlue17', 'DarkBlue2',
'DarkBlue3', 'DarkBlue4', 'DarkBlue5', 'DarkBlue6', 'DarkBlue7',
'DarkBlue8', 'DarkBlue9', 'DarkBrown', 'DarkBrown1', 'DarkBrown2',
'DarkBrown3', 'DarkBrown4', 'DarkBrown5', 'DarkBrown6', 'DarkBrown7',
'DarkGreen', 'DarkGreen1', 'DarkGreen2', 'DarkGreen3', 'DarkGreen4',
'DarkGreen5', 'DarkGreen6', 'DarkGreen7', 'DarkGrey', 'DarkGrey1',
'DarkGrey10', 'DarkGrey11', 'DarkGrey12', 'DarkGrey13', 'DarkGrey14',
'DarkGrey2', 'DarkGrey3', 'DarkGrey4', 'DarkGrey5', 'DarkGrey6',
'DarkGrey7', 'DarkGrey8', 'DarkGrey9', 'DarkPurple', 'DarkPurple1',
'DarkPurple2', 'DarkPurple3', 'DarkPurple4', 'DarkPurple5', 'DarkPurple6',
'DarkPurple7', 'DarkRed', 'DarkRed1', 'DarkRed2', 'DarkTanBlue', 'DarkTeal',
'DarkTeal1', 'DarkTeal10', 'DarkTeal11', 'DarkTeal12', 'DarkTeal2',
'DarkTeal3', 'DarkTeal4', 'DarkTeal5', 'DarkTeal6', 'DarkTeal7',
'DarkTeal8', 'DarkTeal9', 'Default', 'Default1', 'DefaultNoMoreNagging',
'Green', 'GreenMono', 'GreenTan', 'HotDogStand', 'Kayak', 'LightBlue',
'LightBlue1', 'LightBlue2', 'LightBlue3', 'LightBlue4', 'LightBlue5',
'LightBlue6', 'LightBlue7', 'LightBrown', 'LightBrown1', 'LightBrown10',
'LightBrown11', 'LightBrown12', 'LightBrown13', 'LightBrown2', 'LightBrown3',
'LightBrown4', 'LightBrown5', 'LightBrown6', 'LightBrown7', 'LightBrown8',
'LightBrown9', 'LightGray1', 'LightGreen', 'LightGreen1', 'LightGreen10',
'LightGreen2', 'LightGreen3', 'LightGreen4', 'LightGreen5', 'LightGreen6',
'LightGreen7', 'LightGreen8', 'LightGreen9', 'LightGrey', 'LightGrey1',
'LightGrey2', 'LightGrey3', 'LightGrey4', 'LightGrey5', 'LightGrey6',
'LightPurple', 'LightTeal', 'LightYellow', 'Material1', 'Material2',
'NeutralBlue', 'Purple', 'Python', 'Reddit', 'Reds', 'SandyBeach',
'SystemDefault', 'SystemDefault1', 'SystemDefaultForReal',
'Tan', 'TanBlue', 'TealMono', 'Topanga']
などと行数使って全部書き出していたんですけど、こんなこと書かないで
#import PySimpleGUI as eg
themelist =eg.theme_list()
で、テーマのリストはまるっと取れるんですね。それ気づいたとき、なんとも恥ずかしかった(笑)
この記事が気に入ったらサポートをしてみませんか?