{"id":4042,"date":"2022-10-17T22:48:30","date_gmt":"2022-10-17T13:48:30","guid":{"rendered":"https:\/\/www.python.ambitious-engineer.com\/?p=4042"},"modified":"2022-10-17T22:48:30","modified_gmt":"2022-10-17T13:48:30","slug":"entry%e3%82%a6%e3%82%a3%e3%82%b8%e3%82%a7%e3%83%83%e3%83%88","status":"publish","type":"post","link":"https:\/\/www.python.ambitious-engineer.com\/archives\/4042","title":{"rendered":"Entry\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8"},"content":{"rendered":"<p>\u3053\u306e\u30da\u30fc\u30b8\u3067\u306fEntry\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<h2>Entry\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8<\/h2>\n<p>\u30c6\u30ad\u30b9\u30c8\u5165\u529b\u6b04\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092Tkinter\u3067\u306fEntry\u3068\u547c\u3073\u307e\u3059\u3002\u307e\u305a\u306f\u7c21\u5358\u306a\u8868\u793a\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nfrom tkinter import Tk, Entry\r\n\r\n# \u30e1\u30a4\u30f3\u30a6\u30a3\u30f3\u30c9\u30a6\u751f\u6210\r\nroot = Tk()\r\n\r\n# \u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092\u30e1\u30a4\u30f3\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u914d\u7f6e\r\nentry = Entry(root)\r\nentry.pack()\r\n\r\n# \u30a4\u30d9\u30f3\u30c8\u30eb\u30fc\u30d7\u306e\u958b\u59cb\r\nroot.mainloop()\r\n\r\n<\/pre>\n<a href=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2022\/10\/tk_entry_sample.png\"><img loading=\"lazy\" src=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2022\/10\/tk_entry_sample.png\" alt=\"\" width=\"219\" height=\"89\" class=\"alignnone size-full wp-image-4057\" \/><\/a>\n<p>\u30c6\u30ad\u30b9\u30c8\u5165\u529b\u6b04\u304c\u914d\u7f6e\u3055\u308c\u307e\u3057\u305f\u3002\u4ee3\u8868\u7684\u306a\u3082\u306e\u3068\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>background:\u80cc\u666f\u8272<\/li>\n<li>width:\u6a2a\u5e45<\/li>\n<li>textvariable:\u5165\u529b\u5024\u3092\u683c\u7d0d\u3059\u308b\u5909\u6570<\/li>\n<li>justify:\u5165\u529b\u4f4d\u7f6e(left, right, center)<\/li>\n<\/ul>\n<h2>Entry\u306e\u30aa\u30d7\u30b7\u30e7\u30f3<\/h2>\n<p>\u305d\u308c\u3067\u306fEntry\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u5f15\u6570\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<h3>background\u306b\u3088\u308b\u80cc\u666f\u8272\u306e\u6307\u5b9a<\/h3>\n<p>\u4ed6\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3067\u3082\u4f7f\u7528\u3057\u305f\u901a\u308a#RGB\u7b49\u3067\u8272\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u3068\u9752\u8272\u306e\u5165\u529b\u6b04\u3092\u914d\u7f6e\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nentry = Entry(root, background=&quot;#0000FF&quot;)\r\n<\/pre>\n<a href=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2022\/10\/tk_entry_blue.png\"><img loading=\"lazy\" src=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2022\/10\/tk_entry_blue.png\" alt=\"\" width=\"219\" height=\"89\" class=\"alignnone size-full wp-image-4061\" \/><\/a>\n<h3>justify\u306b\u3088\u308b\u5165\u529b\u4f4d\u7f6e\u6307\u5b9a<\/h3>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u5de6\u5bc4\u305b\u3068\u306a\u308a\u307e\u3059\u304c\u3001justify\u5f15\u6570\u306b\u6587\u5b57\u5217left, right, center\u3092\u6307\u5b9a\u3059\u308b\u3068\u305d\u308c\u305e\u308c\u5de6\u5bc4\u305b\u3001\u53f3\u5bc4\u305b\u3001\u4e2d\u592e\u5bc4\u305b\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u53f3\u5bc4\u305b\u306b\u3059\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nentry = Entry(root, justify=&quot;right&quot;)\r\n<\/pre>\n<a href=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2022\/10\/tk_entry_right.png\"><img loading=\"lazy\" src=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2022\/10\/tk_entry_right.png\" alt=\"\" width=\"219\" height=\"89\" class=\"alignnone size-full wp-image-4062\" \/><\/a>\n<h3>textvariable\u306b\u3088\u308b\u5909\u6570\u6307\u5b9a<\/h3>\n<p>\u5165\u529b\u3057\u305f\u30c6\u30ad\u30b9\u30c8\u3092\u683c\u7d0d\u3059\u308bStringVar\u5909\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001Entry\u3067\u5165\u529b\u3057\u305f\u30c6\u30ad\u30b9\u30c8\u3092\u30e9\u30d9\u30eb\u306b\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002Entry\u306b\u9069\u5f53\u306b\u6587\u5b57\u3092\u5165\u529b\u3059\u308b\u3068\u3001\u30e9\u30d9\u30eb\u306b\u305d\u306e\u5024\u304c\u53cd\u6620\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nfrom tkinter import Tk, Entry, Label, StringVar\r\n\r\n# \u30e1\u30a4\u30f3\u30a6\u30a3\u30f3\u30c9\u30a6\u751f\u6210\r\nroot = Tk()\r\n\r\n# \u30e9\u30d9\u30eb\u306e\u914d\u7f6e\r\ntext = StringVar()\r\ntext.set(&quot;\u30b5\u30f3\u30d7\u30eb\u6587\u5b57\u5217&quot;)\r\nlabel = Label(root, textvariable=text)\r\nlabel.pack()\r\n\r\n# \u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092\u30e1\u30a4\u30f3\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u914d\u7f6e\r\nentry = Entry(root, textvariable=text)\r\nentry.pack()\r\n\r\n# \u30a4\u30d9\u30f3\u30c8\u30eb\u30fc\u30d7\u306e\u958b\u59cb\r\nroot.mainloop()\r\n\r\n<\/pre>\n<a href=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2022\/10\/tk_entry_textvar.png\"><img loading=\"lazy\" src=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2022\/10\/tk_entry_textvar.png\" alt=\"\" width=\"219\" height=\"125\" class=\"alignnone size-full wp-image-4063\" \/><\/a>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u30da\u30fc\u30b8\u3067\u306fEntry\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002 Entry\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8 \u30c6\u30ad\u30b9\u30c8\u5165\u529b\u6b04\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092Tkinter\u3067\u306fEntry\u3068\u547c\u3073\u307e\u3059\u3002\u307e\u305a\u306f\u7c21\u5358\u306a\u8868\u793a\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002 \u30c6\u30ad\u30b9\u30c8\u5165\u529b\u6b04\u304c\u914d\u7f6e\u3055\u308c...<\/p>\n","protected":false},"author":1,"featured_media":3866,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[217],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/4042"}],"collection":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/comments?post=4042"}],"version-history":[{"count":5,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/4042\/revisions"}],"predecessor-version":[{"id":4064,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/4042\/revisions\/4064"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/media\/3866"}],"wp:attachment":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/media?parent=4042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/categories?post=4042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/tags?post=4042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}