Ruby 使用 Layout 放置 TkLabel 对象

2015-02-06 0 622
Ruby 使用 Layout 放置 TkLabel 对象
require "tk"

root = TkRoot.new() { title "Today's Date" }
str = Time.now.strftime("Today is \n%B %d, %Y")
lab = TkLabel.new(root) do
        text str
        pack("padx" => 15, "pady" => 10,
             "side" => "top")
      end
Tk.mainloop

遇见资源网 ruby Ruby 使用 Layout 放置 TkLabel 对象 http://www.ox520.com/16254.html

下一篇: ruby实现aes
常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务