class Iup::Matrix

An interactive control, used to display a matrix or grid of strings on a canvas. The API documentation can only hint at the use of this control. For more information see Tecgraf’s documentation on IupMatrix.

Example

matrix =Iup::Matrix.new do |m|
  m.numlin = 3
  m.numcol = 3
  m.set(0, 1, "Country")
  m.set(0, 2, "Capital")
  m.set(0, 3, "Population")
  m.set(1, 1, "England")
  m.set(1, 2, "London")
  m.set(1, 3, "58,620,100")
  m.set(2, 1, "Scotland")
  m.set(2, 2, "Edinburgh")
  m.set(2, 3, "5,546,900")
  m.set(3, 1, "Wales")
  m.set(3, 2, "Cardiff")
  m.set(3, 3, "3,186,600")
  m.readonly = "yes"
end

dlg = Iup::Dialog.new(matrix) do |d|
  d.title = "Matrix Example"
end.map

dlg.show

Note that the dialog must be mapped before being shown, to correctly display the matrix.