Class TFileOpener (unit OxOFile) |
TIExpert
For Debug
Constructors |
Functions |
TFileOpener code } {Overriding to avoid abstract error
Properties |
Events |
Variables |
Constructors |
Functions |
author
Only try to unhook the hook we put in} {If Application.OnMessage = OnMessage then
if
Result = True, Message has been handled
If except isn't here Delphi Crashes
KeyDown
Search from cursor pos Forward to end for invalid char
Destroy
Procedure TFileOpener.HookEditor(Owner: TComponent); {Recursive Proc to find and Hook the editor window} {Pass Application for Owner} {Hook the popup menu for Ctrl-Enter} {This works if user selects popupmenu item, but not if user presses Ctrl-Enter} Var Ctr: Integer; Item: Integer; begin Ctr := 0; While (Ctr < Owner.ComponentCount) and (EditControl = nil) do begin If Owner.Components[Ctr].Classname = 'TEditControl' then begin EditControl := Owner.Components[Ctr] as TCustomControl; If TForm(EditControl).PopUpMenu <> nil then with TForm(EditControl).PopUpMenu do For Item := 0 to Items.Count -1 do If Items[Item].ShortCut = ShortCut(vk_return,[ssCtrl]) then begin MenuItem := Items[Item]; OldonClick := Items[Item].OnClick; Items[Item].OnClick := Self.OnClick; Break; end; end else HookEditor(Owner.Components[Ctr]); Inc(Ctr); end; end;
Overriding to avoid abstract error
TFileOpener code } {Overriding to avoid abstract error
Properties |
Events |
Variables |