Вниз
Скачать: CL | DM;

Новый шрифт в компоненте   Найти похожие ветки 

← →
Navi ©   (2003-07-19 08:06) [0]

Здравствуйте! Достали шрифты. Делаю компонент (см. ниже). Инсталирую, при попытке раскрыть список "FocusFont" получаю "Unable to expand" при нажатии "..." - AV in Vcl50.bpl. Что не так-то?
Спасибо.
Код:
type
TFocusListBox = class(TCustomListBox)
private
FFocusFont: TFont;
protected
procedure SetFocusFont(Value: TFont);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
property FocusFont: TFont read FFocusFont write FFocusFont;
.
end;

implementation

constructor TFocusListBox.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FFocusFont:= TFont.Create;
end;

destructor TFocusListBox.Destroy;
begin
FFocusFont.Free;
inherited;
end;

procedure TFocusListBox.SetFocusFont(Value: TFont);
begin
FFocusFont.Assign(Value);
end;


← →
Юрий Зотов ©   (2003-07-19 09:28) [1]

property FocusFont: TFont read FFocusFont write SetFocusFont;

И еще - SetFocusFont лучше объявить так:
procedure SetFocusFont( const Value: TFont);




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

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.015 c
3-100559
OlegL
2003-07-07 17:19
2003.07.31
DB file


14-100916
Viktor Kushnir
2003-07-13 09:18
2003.07.31
XML


1-100715
aga
2003-07-18 17:05
2003.07.31
TreeView


4-101023
Lefan
2003-05-27 06:27
2003.07.31
Закрыть программу


14-100959
nick-from
2003-07-14 20:20
2003.07.31
17 элт монитор




   Наверх