1 | 1 | !!!tkinter |
---|
2 | 2 | !!tkinterのインストール |
---|
3 | 3 | *[Tkinter のインストール|http://python.keicode.com/advanced/tkinter-install.php] |
---|
4 | 4 | !!モジュール |
---|
5 | 5 | python2.7 : import Tkinter |
---|
6 | 6 | python3 : import tkinter |
---|
7 | 7 | |
---|
8 | 8 | 他にもファイル読み出し、メッセージボックス表示が異なる |
---|
9 | 9 | !!メインメニュー |
---|
10 | 10 | |
---|
11 | 11 | !☓ボタン無効 |
---|
12 | 12 | *[python - Overriding Tkinter "X" button control (the button that close the window) - Stack Overflow|https://stackoverflow.com/questions/3295270/overriding-tkinter-x-button-control-the-button-that-close-the-window] |
---|
13 | 13 | def doSomething: |
---|
14 | 14 | #ここに記入 |
---|
15 | 15 | |
---|
16 | 16 | root.protocol('WM_DELETE_WINDOW', doSomething) |
---|
17 | 17 | |
---|
18 | 18 | !画面サイズ調整無効 |
---|
19 | 19 | *[tkinterの勉強(ウィンドウサイズ変更を禁止する)|https://ameblo.jp/hitochan007/entry-12014898453.html] |
---|
20 | 20 | root.resizable(0,0) |
---|
21 | 21 | 0 : 無効 |
---|
22 | 22 | 1 : 有効 |
---|
23 | 23 | |
---|
24 | 24 | !画面中央に表示 |
---|
25 | 25 | *[Center a Tkinter Window|https://www.daniweb.com/programming/software-development/threads/66181/center-a-tkinter-window] |
---|
26 | 26 | |
---|
27 | 27 | !!ファイル |
---|
28 | 28 | |
---|
29 | 29 | *[Tkinter tkFileDialog module – Python Tutorial|https://pythonspot.com/tk-file-dialogs/] |
---|
30 | 30 | *[Pythonでパスからファイル名を取得する - Python入門|http://kaworu.jpn.org/python/Python%E3%81%A7%E3%83%91%E3%82%B9%E3%81%8B%E3%82%89%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%90%8D%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B] |
---|
31 | 31 | |
---|
32 | 32 | !!スクロールバー |
---|
33 | 33 | *[PythonのTkinterでGUIアプリを作る - Qiita|https://qiita.com/canard0328/items/5ea096352e160b8ececa] |
---|
34 | 34 | |
---|
35 | 35 | !!画像 |
---|
36 | 36 | *[コマンドラインから画像形式を変換する|https://qiita.com/tadsan/items/e718cf3a90fc29f61107] |
---|
37 | 37 | $ sudo apt -y install imagemagick |
---|
38 | 38 | $ convert 元の画像 -quality 100 変換する画像名 |
---|
39 | 39 | |
---|
40 | 40 | *[コマンドラインで画像を縮小する:ImageMagick convert mogrify|http://d.hatena.ne.jp/weblinuxmemo/20090929/p1] |
---|
41 | 41 | $ convert -resize 320x -unsharp 2x1.4+0.5+0 -colors 65 -quality 100 -verbose a.png b.png |
---|
42 | 42 | |
---|
43 | 43 | !!メッセージボックス |
---|
44 | | python2.7表示方法 |
---|
| 44 | !python2.7 |
---|
45 | 45 | *[Python で Tkinter を使って MessageBox を表示する。|http://d.hatena.ne.jp/Cassiopeia/20070818/1187416973] |
---|
46 | 46 | !!その他 |
---|
47 | 47 | *[Python Tkinter|https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q13127833413] |
---|
48 | 48 | |
---|
49 | 49 | |
---|
diff view generated by jsdifflib |