Multi-column popup

Hello. I am new to Xojo. Please have patience with my newbie questions. I have been reading through the “Introduction to Programming with Xojo”. I have 15+ years of structured programming experience with Perl and TCL. I also have a small amount of experience with C ( for microcontrollers) and PerlTK… However I am new to object oriented programming.

My first project is to develop a UI to program a keyboard I am developing. I am trying to figure out how to implement a widget (sorry this may not be the right term) that allows the user to choose from over 100 choices (USB HID 1.1 support 165 valid key codes). The native popup widget only does one column.

Does anyone have suggestions on how to create a multi column custom widget?

My application would instantiate 100’s of these widgets across multiple TabPanels.

Suggestions?

Just for kicks I threw together a simple plainBox window with a grid and a ChooseCode method. You can have it to look at if you like. It would need more code to make sure it’s on screen, and maybe highlights and nicer drawing. Keep in mind that I spent about 15 minutes on it, but it’s maybe a start… :-/

http://www.pidog.com/share/popupgrid.xojo_binary_project

Jim

Thank you very much. I will take a look

I have been playing with this suggestion. It is a very creative solution. I have a question.

How would I change it so that the user selection on the popup-grid would change the label on the button?

use the listbox.change event and the listbox.listindex value combined with listbox.cell to obtain the current cell text. Use that text as button caption.

Doing this on the Mac is relatively trivial. I don’t remember off the top of my head, but it was not as trivial in Windows and we had to resort to a declare or two. Sorry, it’s been a while but it had something to do with the Window types.

I may be wrong but I thought I read somewhere on this forum that the PlainBox window might soon be scheduled for deprecating.