01-12-2006 11:32 AM
01-13-2006 03:26 PM
Interesting application! Unfortunately I do not
believe that it is possible to track events through the popup menu except for
the event commits that are a result of actually selecting an item. I
think your best bet to proceed would be to create a very small panel containing
a listbox control which you could populate with the possible items for the
user. When the user is typing and you would like to display the listbox
you could call a function which displayed the panel in the appropriate size/location,
populated the listbox. Then if the user selects an item on the listbox
you can catch that event, and if the user continues to type without selecting
one of the items you could just discard the panel with the listbox.
Let me know how things go, or if you (or other community members) come up with any other ideas!
01-13-2006 05:19 PM
01-16-2006 11:22 AM
Hello,
I belive that you can still monitor the text in the main panel, when you match
the first couple letters that you would want to have a popup for you can
programmatically load the sub-panel containing the listbox. Once this is
called the sub panel should be active allowing it to respond do the arrow keys.
GetRelativeMouseState
(panelHandle, 0, &x, &y, 0, 0,0);
if ((listboxPanel =
LoadPanel (0, "menu.uir", LSTBXPNL)) < 0)
return -1;
DisplayPanel
(listboxPanel);
SetPanelAttribute
(listboxPanel, ATTR_LEFT, x);
SetPanelAttribute
(listboxPanel, ATTR_TOP, y);
When I execute this code snippet the sub panel displays at the current mouse
location and the listbox is actively responding to the arrow keys.
Let me know if this works out, I am still interested in finding a way to do
this!
01-16-2006 12:07 PM
01-16-2006 12:43 PM