implementation
constructor TDataField.Create(aOwner: TComponent);
begin
inherited Create(aOwner);
Self.OnKeydown:=KeyDown;
end;
destructor TDataField.Destroy;
begin
end;
Procedure TDataField.KeyDown(Sender: TObject; var Key: Word;Shift:
TShiftState);
Begin
if Shift=[ssShift] then
if key=VK_UP then Self.Top:=Self.Top-2;
end;
I used TPanel, because Im putting a label and for example editbox
dynamically. Here is the problem;
KeyDown event catchs the key strokes except arrow keys.(Imean
VK_UP,DOWN,LEFT and Right. What is the problem? Why I cant use them? I can
use all other keys. Is it true to use TPanel? or I had to use TWinControl or
something like that? I tried with TWinControl but the result is same.
Thanks.
Gürcan YÜCEL
DLGC_BUTTON Button.
DLGC_DEFPUSHBUTTON Default push button.
DLGC_HASSETSEL EM_SETSEL messages.
DLGC_RADIOBUTTON Radio button.
DLGC_STATIC Static control.
DLGC_UNDEFPUSHBUTTON Non-default push button.
DLGC_WANTALLKEYS All keyboard input.
DLGC_WANTARROWS Direction keys.
DLGC_WANTCHARS WM_CHAR messages.
DLGC_WANTMESSAGE All keyboard input (the application passes this
message in the MSG structure to the control).
DLGC_WANTTAB TAB key.
(from the platform SDK of microsoft)
I think you have to return DLGC_WANTALLKEYS or DLGC_WANTARROWS. Or if you
don't want the char keys just return DLGC_WANTARROWS.
Regards
Florent
"Gürcan YÜCEL" <gyu...@g-gsoft.com> a écrit dans le message de
news:4013...@newsgroups.borland.com...