Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 28 MAR 2007 05:25:43PM James Mowbray wrote:

I have a client using AREV (3.1.2) whose system uses POPUPs as menus.

They like this method as it allows them to use the numeric keypad to select menu items (they ALWAYS have NUMLOCK on). I have programmed a form to duplicate their interface using pages of pushbuttons and have included a menu event for each of the numbers '0' thru '9' which trigger a CLICK event to the appropriate button in the form. (This is possible because there are NO edittable controls on the form.) Unfortunately, the method only seems to work with the number keys at the top of the keyboard; the numeric keypad is ignored. Does anyone know how to trap for the numeric keypad? I would try using the CHAR event, but it doesn't exist at the form level, and I have tried qualifying the WM_CHAR message (0x0102), but that is ignored also.


At 28 MAR 2007 06:28PM [email protected] wrote:

by using the char event you should be able to see what has been pressed. Have you tried that?


At 29 MAR 2007 08:23AM James Mowbray wrote:

The CHAR event isn't available at the WINDOW level.


At 29 MAR 2007 08:57AM Bob Carten wrote:

In the course of some RevG conversions I have implemented similar menus.

In one version I use a listbox to display the text, trapping the char event to determine which number was typed. If the user types a number I set setpos to that item, then send the changed event. If they use arrow keys I scroll to the item, but suppress the changed event.

I the changed event triggers the navigation, so that users can type a number, arrow and press enter, or click on an item. Menus are stored in a table similar to Arevs menus table, with multivalued description, code, command and parameter columns. I display a menu by the list property of the listbox with the description column from a menu table.

Very dynamic, rather ugly.

In another version I used the same logic but used an OLE control and

rendered the menus as HTML buttons with a URL that contained the item number. In that case I had to intercept the OLE BeforeNavigate2 event. Loading menus is accomplished by setting the Document.Body.InnerHtml property.

HTH

Bob

At 29 MAR 2007 11:11AM James Mowbray wrote:

I think I found another way around the problem. I painted an EDITFIELD control onto the form with a CHAR event override, then 'hid' the control by destroying it, changing its SDKSTYLE to remove the border AND 3D tag, then recreating it. (Other than the vertical bar cursor, the control is invisible.) I can then use the CHAR event to redirect the request to the menus.

Thanks for your suggestions,

Jim

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/70721416e52e2799852572ac0075b63c.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1