aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/sample/tkextlib/iwidgets/sample/labeledframe.rb
blob: 52bf957208ec55b698d0287a7913b2bb659f0233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env ruby
# frozen_string_literal: false
require 'tk'
require 'tkextlib/iwidgets'

lf = Tk::Iwidgets::Labeledframe.new(:labeltext=>'Entry Frame', :labelpos=>:n)
lf.pack(:fill=>:both, :expand=>true, :padx=>10, :pady=>10)

cs = lf.child_site

Tk::Iwidgets::Entryfield.new(cs, :labeltext=>'Name:').pack(:side=>:top, :fill=>:x)
Tk::Iwidgets::Spinint.new(cs, :labeltext=>'Number:').pack(:side=>:top, :fill=>:x)
Tk::Iwidgets::Pushbutton.new(cs, :text=>'Details:').pack(:side=>:top, :fill=>:x)

Tk.mainloop