Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Trying to write search component (Read 2011 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Trying to write search component

Trying to write search component

I'm trying to write my first foobar component but am having trouble figuring out the SDK files. I want to create a search panel that can be placed on the main layout. It would be similar to the default Media Library Search panel and have these changes:

1) Pressing the down key when inside the search box would move the focus to the first search result.

2) Pressing the up key when focused on the first search result would return the focus to the search box.

3) Dividers, blank lines, or text background colors would be used to organize the results list based on artist and album.

What strategies should I use for creating this component? Which SDK files would be useful?

Also, how do I create a keyboard shortcut to place the focus on the search box in my component?

Trying to write search component

Reply #1
Have you already checked the foo_sample component in the SDK? It demonstrates how to write a UI element (i.e. integrate a panel in the main window of the Default UI) and how to add a command to the main menu (among other things).