Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.01.20;
Скачать: CL | DM;

Вниз

Ищу компонент   Найти похожие ветки 

 
VJar   (2003-01-04 13:45) [0]

Кто знает компонент кнопки, на которую можно помещать рисунок
и когда свойство Enabled=false, этот рисунок не исчезает, а становится
серым?


 
mrcat ©   (2003-01-04 13:48) [1]

а чем стандартные дельфовые кнопки не угодили?


 
Verg ©   (2003-01-04 13:48) [2]

TBitBtn ?
TBitBtn is a push button control that can include a bitmap on its button face.
.....
Although the button can be associated with only one bitmap, the bitmap (glyph property) can be subdivided into four equally sized portions which are displayed based on the state of the button: up, down, and disabled.


 
VJar   (2003-01-04 14:13) [3]

Извините, забыл отметить. Нужно, что было свойство Flat.


 
KIR ©   (2003-01-04 14:33) [4]

Поищи компонент IAeverButton на www.torry.net
Для России он FW. Позволяет изгалятся с кнопкой как только душе угодно


 
Opuhshii ©   (2003-01-04 14:53) [5]

unit MySpeedButton;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Buttons, ImgList;

type
TMySpeedButton = class(TSpeedButton)
private
FImageList:TCustomImageList;
FImageIndex:Integer;
{ Private declarations }
protected
procedure Paint; override;
{ Protected declarations }
public
procedure SetImageIndex(Value:Integer);
{ Public declarations }
published
property ImageList:TCustomImageList read FImageList write FImageList;
property ImageIndex:Integer read FImageIndex write SetImageIndex;
{ Published declarations }
end;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents("Opuhshii", [TMySpeedButton]);
end;

{ TMySpeedButton }

procedure TMySpeedButton.Paint;
begin
inherited;
if Assigned(FImageList) then
if (FImageIndex in [0..Pred(FImageList.Count)]) then begin
if not Enabled then begin
FImageList.Draw(Canvas,Round(Width/2-FImageList.Width/2),Round(Height/2-FImageList.Height/2),FImageIndex,False)
end else
FImageList.Draw(Canvas,Round(Width/2-FImageList.Width/2),Round(Height/2-FImageList.Height/2),FImageIndex,True);
end;
end;

procedure TMySpeedButton.SetImageIndex(Value: Integer);
begin
if Assigned(FImageList) then
if (Value in [0..Pred(FImageList.Count)]) then begin
FImageIndex:=Value;
Paint;
end;
end;

end.

3 минуты и столько счастья,.. ;)) используй ImageList,.. и ImageIndex....



Страницы: 1 вся ветка

Текущий архив: 2003.01.20;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.012 c
1-62601
+++TAW+++
2003-01-09 09:34
2003.01.20
Последовательность в Memo


1-62588
Maksss
2003-01-09 02:37
2003.01.20
вопрос в тему?


7-62860
Andy BitOff
2002-11-05 20:02
2003.01.20
Состояние принтера


1-62629
eugene_jin_t
2003-01-09 11:02
2003.01.20
Создание компонент


14-62775
Sergo
2002-12-30 10:26
2003.01.20
Поздравляю!!!