English 中文(简体)
Search by using the keyboard in a list/grid - algorithm
原标题:

I need to implement a custom search in a grid and I would like to find some user interface guidelines that explain the standard way to implement it.

I mean this kind of search that is initiated by the user using the keyboard. The focus on the grid must move to the first row that match the pressed key.

I would like to find a good algorithm to do it.

Thanks.

问题回答

There is no standard way, many grids/lists implement this in different ways and it drives me bonkers. Some only search on the first letter, some search on multiple letters without indicating which ones, others show a (non-modal) window that shows which letters it is currently using, others keep this buffer hidden and use a timeout to reset, other don t reset at all or with a (hidden) key like esc.

From the way you phrase your question it sounds like a simple jump to first row that starts with the pressed char - which is the simplest use case, and I fail to see what the algorithm in this case should do.

If there is a specific application you want to mimic I think you should provide a detailed description of its behavior. Although I think that after making this description, the algorithm will be peanuts.





相关问题
Problem statically linking MFC libraries

I have a Visual Studio 6 workspace I m trying to convert to a Visual Studio 2008 solution. The output of said solution is a .dll. It has to be a .dll and it needs to statically link MFC as I can t ...

Switching to WPF. Is it time?

I m considering switching from MFC to WPF. My first concern is that there are too many users who don t have .NET with WPF installed yet. Can anybody point to a source containing the WPF penetration ...

Crash within CString

I am observing a crash within my application and the call stack shows below mfc42u!CString::AllocBeforeWrite+5 mfc42u!CString::operator=+22 No idea why this occuring. This does not occur ...

C# for UI, c++ for library

I have a numerical library coded in C++. I am going to make a UI for the library. I know some MFC. So one solution is to use MFC and make a native application. The alternative is C#. I know nothing ...

Search by using the keyboard in a list/grid - algorithm

I need to implement a custom search in a grid and I would like to find some user interface guidelines that explain the standard way to implement it. I mean this kind of search that is initiated by ...

MFC List Control

In MFC, I can edit the text of items in the list control but only for the first column by setting the Edit Labels to true. Now when I click the first column item to change its text, I m able to change ...

热门标签