# How to create a searchable list in FXRuby?

**URL:** <https://www.ruby-forum.com/t/how-to-create-a-searchable-list-in-fxruby/258979>\
**Category:** FXRuby\
**Created:** [March 21, 2020, 5:23am UTC](https://www.ruby-forum.com/t/how-to-create-a-searchable-list-in-fxruby/258979 "2020-03-21T05:23:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![petecatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ac91a4/32.png) [@petecatt](https://www.ruby-forum.com/u/petecatt)\
**Post date:** [March 21, 2020, 5:23am UTC](https://www.ruby-forum.com/t/how-to-create-a-searchable-list-in-fxruby/258979/1 "2020-03-21T05:23:16Z")

</div>

I’m trying to make a searchable list in FXRuby. The list needs to have a search bar where you can search for items, and a new window needs to open if you click a specific item. Here’s the code so far:

```
def initialize(app, title, w, h)
	super(app, title, :width => w, :height => h)
	data = (0..9).to_a.repeated_permutation(3).map{|x,y,z| "#{x}#{y}#{z}"}
	hframe = FXVerticalFrame.new(self, :opts => LAYOUT_FILL)
	boxes = FXList.new(hframe,
		:opts => LIST_NORMAL|LIST_EXTENDEDSELECT)
	a = 0
	while a < 1000
		count = DB["coord#{data[a]}"].count
		boxes.appendItem("Box #{a}, coordinates #{data[a]}, items: #{count}")
		a += 1
	end
	bin = FXLabel.new(hframe, "Unassigned items")
end
def create
	super
	show (PLACEMENT_SCREEN)
end

```

Any suggestions? Thanks 🙂
