#!ruby # -*- mode: ruby; coding: utf-8; encoding: utf-8 -*- # Last updated: <2023/10/20 03:52:03 +0900> # # Label and Button sample. # # * Windows10 x64 22H2 + Ruby 1.9.3 p551 i386-mingw32 + Tk # * Windows10 x64 22H2 + Ruby 2.6.10 p210 i386-mingw32 + Tk 0.4.0 # * Windows10 x64 22H2 + Ruby 3.0.4 p208 i386-mingw32 + Tk 0.4.0 # * Windows10 x64 22H2 + Ruby 3.2.2 i386-mingw32 + Tk 0.4.0 require 'tk' require 'kconv' TkLabel.new { text 'こんにちは世界。Hello world.'.toutf8 }.pack TkButton.new { text '終了'.toutf8 command 'exit' }.pack Tk.mainloop