Showing changes from revision #0 to #1:
Added | Removed
require "rubygems"
require "wx"
include Wx
class Ejemplo < App
def on_init
frameEjemplo = Frame.new(nil, -1, "Ejemplo")
bt1 = Button.new(frameEjemplo, 1, "click 1", [20, 20], DEFAULT_SIZE, BU_TOP)
colores = ["celeste y blanco", "rojo y amarillo", "verde, blanco y rojo"]
cmbbox = ComboBox.new(frameEjemplo, 2, "combobox", [20, 60],
[200, 30],
colores)
evt_button(1) { | event |
index = cmbbox.get_selection
if index >= 0
printf "%d: %s\n", index, colores[index]
else
printf "-1: %s\n",cmbbox.get_value
end
}
frameEjemplo.show()
end
end
Ejemplo.new.main_loop