bitbtn,speedbutton可以设置图片,但与文字在同一图层,我希望文字是叠加在图的上面。
button的brush,bitmap怎么使用?
谢谢各位。在线等待
button的brush,bitmap怎么使用?
谢谢各位。在线等待
解决方案 »
- 求解“水平偶数同位”
- 统计一下程序员生儿子的概率 有感于“您打算干到什么时候?”
- 不懂了!!在线等等答案
- Memo控件显示繁体
- 求助!急!
- 哪位DX有reportmachine,flatdbctrls的第三方控件,能否给我发一个,或告诉我下载的地址,谢谢
- 救命啊~!超过五万条数据要通过客户端程序写入服务器的数据库内,求解~~!拜托高手指教~!
- DELPHI6的 DBchart 控件用法,谢谢,急,马上给分
- DBGrid 的SelectIndexChange事件
- 有关WIDESTRING和UNICODE的编码问题?
- TForm,Tpanel,Tlabel,Tcombobox,TEdit,Tbutton在组件选项板的哪个地方?
- 救救他吧,他需要大家的援助之手!
TMyBtn=class(TCustomControl)
.........
private
FGlyph:TBimtap;
/////////
procedure SetGlyph(Val:TBimtap);
.................
protected
procedure Paint;override;
............
published
........
//公布新属性
property Glyph:TBimtap read FGlyph write SetGlyph;constructor TMyBtn.Create(AOwner:TComponent);
begin
inherited Crerate(AOwner);
FGlyph:=TBimtap.Create;
........
end;
/////析构中记得销毁FGlyph;procedure TMyBtn.SetGlyph(val:TBitmap);
begin
FGlyph.Assign(val);
invalidate;
end;
procedure TMyBtn.Paint;
begin
with Canvas do
begin
///////如果有图片,那么画上去
if not FGlyph.Empt then
Draw(0,0,FGlyph);
//////如果有Caption 那么画上去。
TextOut(0,0,Caption);
end;end;
////////具体什么样子,,全看你想要的了当然一个完整的Button不只这些要写。。其他的需要写的东西可以看三方Button的代码。