重赏:::!!!如何把Tdblookupcombobox的下拉按钮中的三角改为...(三个点的按钮) (80分)

  • 主题发起人 主题发起人 邓娟IsMyLover
  • 开始时间 开始时间

邓娟IsMyLover

Unregistered / Unconfirmed
GUEST, unregistred user!
如何把Tdblookupcombobox的下拉按钮中的三角改为...(三个点的按钮)????
 
什么叫“三个点”
 
我的邮件是lglyxx@public.szptt.net.cn
lxmlhh@21cn.clm
那个WEB不懂就不要擦嘴。
 
在TDBLookupCombo.Create的事件中修改此句程序
FButton.Glyph.Handle := LoadBitmap(0, PChar(32738));可以自己做个资源文件来调用。
 
呵你可以看看FLATSTYLE控件的源码:)
 
请问:
cxg8888:
在TDBLookupCombo控件中并没有:FButton这个变量呀,能详细说明吗?谢谢
 
它这么说,可能是私有变量。
如果这样,继承一下,把它 public
 
请问:
cxg8888:
在TDBLookupCombo控件中并没有:FButton这个变量呀,能详细说明吗?谢谢
 
请查查Delphi提供的源代码。
constructor TDBLookupCombo.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
AutoSize := False;
FFieldLink := TFieldDataLink.Create;
FFieldLink.Control := Self;
FFieldLink.OnDataChange := DataChange;
FFieldLink.OnEditingChange := EditingChange;
FFieldLink.OnUpdateData := UpdateData;
FFieldLink.OnActiveChange := FieldLinkActive;
FBtnControl := TWinControl.Create(Self);
FBtnControl.Width := 17;
FBtnControl.Height := 17;
FBtnControl.Visible := True;
FBtnControl.Parent := Self;
FButton := TComboButton.Create(Self);
FButton.SetBounds(0, 0, FBtnControl.Width, FBtnControl.Height);
[blue]FButton.Glyph.Handle := LoadBitmap(0, PChar(32738));[/blue]
FButton.Visible := True;
FButton.Parent := FBtnControl;
FGrid := TPopupGrid.Create(Self);
FGrid.FCombo := Self;
FGrid.Parent := Self;
FGrid.Visible := False;
FGrid.OnClick := GridClick;
Height := 25;
FDropDownCount := 8;
end;
 
问cxg8888:
你用的不是Delphi5吧? Delphi5是这样的:

constructor TDBLookupComboBox.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
ControlStyle := ControlStyle + [csReplicatable];
Width := 145;
Height := 0;
FDataList := TPopupDataList.Create(Self);
FDataList.Visible := False;
FDataList.Parent := Self;
FDataList.OnMouseUp := ListMouseUp;
FButtonWidth := GetSystemMetrics(SM_CXVSCROLL);
FDropDownRows := 7;
end;
 
不好意思,看错了,我们说的是不同的类。
在TDBLookupComboBox的Paint事件中最后一句是
DrawFrameControl(Canvas.Handle, R, DFC_SCROLL, Flags);
你把它注释之后再看看。注意把路径指定,否则注释不起作用。
 
后退
顶部