我在书上看到一个语句,如下:
  edit1.setfocus;
请问这句是什么意思?这个是一个函数,还是一个什么?有请各位指教指教.小弟在此写过了.

解决方案 »

  1.   

    设置焦点在edit1上, 意思光标在这个控件上。
      

  2.   

    这个函数
    procedure TWinControl.SetFocus;
    var
      Parent: TCustomForm;
    begin
      Parent := GetParentForm(Self);
      if Parent <> nil then
        Parent.FocusControl(Self)
      else if ParentWindow <> 0 then
        Windows.SetFocus(Handle)
      else
        ValidParentForm(Self);
    end;按住ctrl+点鼠标点击 setfocus 就看到了
      

  3.   

    是一个方法(procedure过程),函数(function)是有返回值的