Listbox control by keyboard

I' d like to write a procedure to create a panel with two listbox: the first with a list of the primary folders and in the second with the waves that are located in the folder selected in the first listbox.
I could manage to write the code but I have a problem: I cannot to select a folder in the "first" listbox by using the keyboad arrow keys.
If I cut the part of the code to write the listbox for the wave I can use the keyboad arrow keys.
Any hints are much appreciated.
I am using IP 6.22A on a MB Pro.

Thanks

Simone

It would be good if you could post an experiment containing a simplified example showing the problem.

Here the procedure that I wrote.
If i remove the part after
" /// It creates a the wave "list_waves" with the wave in the selected folder """
I can select the folder in the first listbox with eyboad arrow keys but I can't to list the waves in the second listbox


news_easy.ipf
The problem is that this statement in proc_list_folder:
//
//
ListBox list_wave ,pos={300,13},size={273,241}, fsize=12, listwave=list_waves, mode=1, proc=procedura_list_wave
//
//

takes the focus away from the folder list.

That statement is unnecessary because it is executed in the Panel function and does not need to be executed again, so you can remove it.