combobox 点上去(获得焦点时)才出向下小箭头按钮,否则不出,就像Edit那样,请问有没有这样的控件,如何设置? 

解决方案 »

  1.   

    用一个Edit和ComboBox叠在一起,焦点变化时代码控制哪一个显示在前面 
      

  2.   

    OnEnter事件:
    var 
        nHandle:   HRGN;
    begin
        with   Combobox1   do
        begin
            nHandle   :=   CreateRectRgn(0,   0,   width,   height);
            SetWindowRgn(Handle,   nHandle,   True);
        end;
    end;在OnExit事件:var
        nHandle:   HRGN;
    begin
        with   Combobox1   do
        begin
            nHandle   :=   CreateRectRgn(0,   0,   width-20,   height);
            SetWindowRgn(Handle,   nHandle,   True);
        end;
    end