I work full time as a delphi developer
it's a very powerful and flexible language, unfortunately due it not being particularly well used it's not particularly lucrative
You can get away with using it like a more database friendly version of old visual basic or it can be used in proper enterprise environments.
The problem you are having with you first question, is firstly that you're requesting strings[1] rather than strings[0]
Delphi is a 0 based language so the first element will always be 0. This means to loop through stuff it's always to the items.count-1
The second problem seems to be related to the Tstrings object, you're far better off using Tstringlist, mainly because that's what the delphi helpfiles seem to recommend, and I've seen little reason to argue with them.
The second one sounds rather more complicated, I think popup menus will only respond to the first valid keystroke that matches the first letter of an option on the menu.
Honestly, I don't think a generic popup menu is going to do what you want, and off the top of my head I've not got an instant solution, though I may have misunderstood what you're trying to do
|