LeTay
asked on
Simulate the <Enter> key in editable TStringGrid cell
I have a TStringGrid with editable cells (set the options correctly).
Now I want this to happen : when the user encode the = sign in a cell, the <Enter> key should be simulated.
So the user does not have to hit the <Enter> key in that situation
Thanks
Now I want this to happen : when the user encode the = sign in a cell, the <Enter> key should be simulated.
So the user does not have to hit the <Enter> key in that situation
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you make small test project with same grid Options. Are you in edit mode when pressing SHIFT+0 (aka '=')?
What happens when you press ENTER? (or want to)
It exit edit mode in my case.
What happens when you press ENTER? (or want to)
It exit edit mode in my case.
ASKER
Hello, on my keyboard, AZERT Belgium, the = sign is NOT shift-0 !
That's the difference
The = sign is just ... the equal sign without shift
That's the difference
The = sign is just ... the equal sign without shift
so, if you put his code:
what is showed on message in case when press '='?
procedure TForm7.StringGrid1KeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
ShowMessage(IntToStr(Key));
end;
what is showed on message in case when press '='?
ASKER
Found 187
Used now
Works
Used now
Works
yes, VK_OEM_PLUS when look in this table....
ASKER
Second proposal does not work, = is not referenced anywhere