The accelerator key and a PopupMenu Control

How do I store URLs into an Array (now *)

In the needed location I already set a TextField to store he URLs I use.

When I decided to implement an embryon of an History feature, I added an Array in a Module, using .Append to fill URLs into it, UBound() to get the number of entries, a Loop to populate a PopupMenu and that PopupMenu is used to go thru the History.

In the process, I lost some ‘&’ characters…

The screen shot displays the difference in the PopupMenu and the ListBox.

I checked the Language Reference and do not found anything talking about keyboard accelerator.

Yes, I realized that it is a case where an accelerator key can be used: in the ListBox we can see all’&’ characters I typed (two, three, four; I use a space to separate the group of characters) and in the PopupMenu, one of them is missing in each group.

So, in the absolute, this is not a bug, but something can be done (if you want; I will not wait for it).

BTW: that PopupMenu does not have (cannot have by default) the focus…

BTW 2: when I click (once to set the PopupMenu open), and typind a or z, the first / last entry is selected (sometimes only after many key presses). Is this for the Power + Power + User ?
(I learned ** some month ago that a PopupMenu can react to a key press…)

BTW 3: I do not checked - yet - under Windows how this works.

For me: I deleted the MenuItem and keep the ListBox (I added a bi-color background) and add code in the DoubleClick Event to pass the selected URL from the History process.
Problem: the window looks like the Bookmark window (and it is far different: no Toolbar for example).

Have a nice coding.

PS: after thinking (loud), I realized that the use of a PopupMenu COntrol in this case was not a good idea. Using two simiilar windows to do somehowdifferent purposes is not good to but this works.

  • I replaced the Dictionary use by an array property.

** I am in the computer business since early 1980. And I learned things everyday since then (not like some people I meet times ago who apparently never learn anything beside when he was trained here and then). One more learned thing !

The screen shot:
(https://www.sendspace.com/file/w5mbus)