Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keypress : detect shift+tab

Status
Not open for further replies.

AP81

Programmer
Apr 11, 2003
740
AU
I have a combo box which I want to detect whether shift and tab are pressed so I can set focus to the previous control, i.e If I press shift+tab to move back through the controls, when the combobox has focus it sends focus to then next control tab order not the previous control tab order.

I have tried using using keypress, but I can only get it to detect the shift key.

Any ideas?




------------------------------------
There's no place like 127.0.0.1
------------------------------------
 
worked it out. Created the following procedure:

procedure TfrmMain.cboItemsKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if ssShift in Shift then
begin
if (key in [VK_TAB]) then
blnShiftTab := True;
end
else
begin
blnShiftTab := False;
exit;
end;
end;




------------------------------------
There's no place like 127.0.0.1
------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top