Method: TkGrid.rowconfiginfo

Defined in:
lib/tk/grid.rb

.rowconfiginfo(master, index, slot = nil) ⇒ Object



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/tk/grid.rb', line 143

def rowconfiginfo(master, index, slot=nil)
  # master = master.epath if master.kind_of?(TkObject)
  master = _epath(master)
  if slot
    case slot
    when 'uniform', :uniform
      tk_call_without_enc('grid', 'rowconfigure',
                          master, index, "-#{slot}")
    else
      num_or_str(tk_call_without_enc('grid', 'rowconfigure',
                                     master, index, "-#{slot}"))
    end
  else
    #ilist = list(tk_call_without_enc('grid', 'rowconfigure', master, index))
    ilist = simplelist(tk_call_without_enc('grid', 'rowconfigure',
                                           master, index))
    info = {}
    while key = ilist.shift
      case key
      when 'uniform'
        info[key[1..-1]] = ilist.shift
      else
        info[key[1..-1]] = tk_tcl2ruby(ilist.shift)
      end
    end
    info
  end
end