cbpporter Messages: 1401 Registered: September 2007
Ultimate Contributor
One of the first real issues I discovered in U++ that hasn't been fixed yet was the fact that you can't specify the position of an access key: "Zoom &Out" will highlight the first "o" in the text, not the third one.
Here is a possible fix for it. Not exactly the way I wanted it, but I did it this way so that only controls who specify a manual access key get affected by modified code and I also wanted to maintain backward compatibility.
Here is the general mechanism to implement access key positioning:
Well, that is reasonable, and initially I have used it, but later I was thinking and rather changed the code to use 'int' instead of 'byte' for accesskey and encode position in high-word. IMO it is more simple for adapting existing code and even to use.
In Zoom Out, 'O' would take precedence over 'o' now...
(But maybe some more coding would be nice, as during the 'distribution' 'o' in preceding item would spoil the fun. The correct would perhaps be to make two passes - one assigning upper letters, second lower for rest).
cbpporter Messages: 1401 Registered: September 2007
Ultimate Contributor
Well this works also. I didn't want to change the meaning of the field. I planned this as intermediate stage towards having internationalized access keys, where I would extend also to an int storage. No use getting national keyboard if you can't use it to select items in menus . If you stick other information in that int, it may make things harder. But 32 bits should be enough!
Tested and works fine. It's nice that there isn't a need to modify every widget to enable correct behavior.
cbpporter Issue #003: Accelerator keys are not properly aligned
Fixed