| |
| Forcing edit mode in a TListView via a keypress |
 |
When the user clicks on a caption in the listview, it goes into edit mode. How can I force the edit mode by pressing F2 or a similar key?
The following example demonstrates trapping the F2 key in a Listview control and forcing the caption into edit mode.
Example:
procedure TForm .ListView KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Ord(Key) = VK_F2 then
ListView .Selected.EditCaption;
end;
|
|
| Hits/month |
2,500,000+ |
Downloads (Since May 2000) |
7,393,709 |
| Total Files |
6,023 |
| Forum msgs |
7,670 |
| Articles/FAQs |
70+/900+ |
Top Selling Software at Amazon
|