|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by terlik in Delphi Programming
Hi,
If I can't see all the columns of the stringgrid because of the screen resolution, How can I move on the stringgrid columns, too see the other columns, without losing the focus on the stringgrid? I did something like the code below, but in that the focus on the grid is being lost.
Shortly, I want to scroll in the stringgrid, to the right by tab key, without losinf the focus of cursor.
Thanks for the answer,
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
|
procedure StringGrid1KeyPress(Sender: TObject; var Key: Char);
begin
if ((key = #9) or
(key = #13)) then
begin
With Sender As TStringGrid Do
begin
if Col < (ColCount-1) Then
begin
Col := Col+1;
end
else
begin
Col := FixedCols;
end;
end;
Key := #0;
end;
end;
|
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625