fxruby icon indicating copy to clipboard operation
fxruby copied to clipboard

FXComboBox Query

Open nzneil22 opened this issue 3 years ago • 2 comments
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

nzneil22 avatar May 02 '22 08:05 nzneil22

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 avatar May 14 '23 08:05 vin1antme

@vin1antme It works - thank you!

larskanis avatar May 14 '23 18:05 larskanis