@Peter T How then does one create a PopupMenu with autocomplete?
I believe there are two approaches : "à la Xojo" and "à la Google".
A la Xojo where the first possible termination appears as grey right after the caret is possible with a canvas laid over the TextField showing the grey text.
All you need is this kind of code in the paint event displayed if the entered text matches the first part of the probable complete :
Sub Paint(g As Graphics, areas() As REALbasic.Rect)
g.ForeColor = &cB3B3B300
g.textsize = 0
g.textfont = "System"
Now the tricky part is to use TextWidth to see where the entered text ends, so you can display the grey proposition. In the example above I did it "hard coded" just for demo purposes.
The à la Google way requires using a listbox underneath to display the different propositions, essentially the way the drop down menu would. But since I found no way to drop the list by code, that is the way I would do it.
That said, I agree with Markus. It seems a bit futile not to use simply a PopupMenu.