Methods
B
N
Attributes
[R] col
[RW] oval
[R] row
Class Public methods
new(view, row, col)
# File ext/tk/sample/tcltklib/sample2.rb, line 197
def initialize(view, row, col)
   @view = view
   @id = @view.e("create rectangle",
                 *(view.tk_rect(view.left + col,
                                view.top + row,
                                view.left + col + 1,
                                view.top + row + 1)                              << "-fill #{BACK_GROUND_COLOR}") )
   @row = row
   @col = col
   @view.e("itemconfigure", @id,
     "-width 0.5m -outline #{BORDER_COLOR}")
   @view.e("bind", @id, "<Any-Enter>", TclTkCallback.new($ip, proc{
      if @oval == nil
         view.e("itemconfigure", @id, "-fill #{HILIT_BG_COLOR}")
      end
   }))
   @view.e("bind", @id, "<Any-Leave>", TclTkCallback.new($ip, proc{
      view.e("itemconfigure", @id, "-fill #{BACK_GROUND_COLOR}")
   }))
   @view.e("bind", @id, "<ButtonRelease-1>", TclTkCallback.new($ip,
      proc{
      view.click_square(self)
   }))
end
Instance Public methods