Главная страница
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.013 c
7-62883
cecist
2002-11-04 16:09
2003.01.20
Как программно вводить пароли в Windows2000


6-62699
kalishenko stas
2002-11-19 17:45
2003.01.20
Запуск любого приложения на удал. клиенте


6-62681
Ocean
2002-11-20 14:49
2003.01.20
Русский текст из html-формы


1-62448
Валерий
2003-01-07 19:05
2003.01.20
TreeView Codepage for nodes


1-62487
ЮРИЙ_К
2003-01-10 11:54
2003.01.20
Хинт в трэе под ХР ???