Listbox control by keyboard

simcacl
Posts: 9
Joined: 2012-08-19
Location: Italy

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


[ last edited August 19, 2012 - 09:42 ]
Posts: 906
Joined: 2007-06-21
Location: United States

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


simcacl
Posts: 9
Joined: 2012-08-19
Location: Italy

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

AttachmentSize
news_easy.ipf3.66 KB

Posts: 906
Joined: 2007-06-21
Location: United States

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.


simcacl
Posts: 9
Joined: 2012-08-19
Location: Italy

Thanks hrodstein!!
It works now!!


Back to top