fxruby
fxruby copied to clipboard
FXComboBox Query
trafficstars
Hi,
Is there a way to open the menu pane of a Combobox using code?
I would like to toggle the visibility of the combobox's selection drop-down list
example, FXComboBox.showList(TRUE)
TIA
require "fox16"
include Fox
app = FXApp.new
main = FXMainWindow.new(app, "Hello, ComboBox!", :width => 250, :height => 150, :padding => 5)
combo = FXComboBox.new(main, 30, :opts => LAYOUT_CENTER_X)
combo.numVisible = 5
combo.fillItems(["item1", "item2", "item3", "item4", "item5"])
app.create
main.show(PLACEMENT_SCREEN)
p combo.children
combo.last.handle(nil, Fox.FXSEL(Fox::SEL_LEFTBUTTONPRESS, 0), nil)
p combo.paneShown?
app.run
@vin1antme It works - thank you!