Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.07.31;
Скачать: 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 вся ветка

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

Наверх




Память: 0.46 MB
Время: 0.013 c
1-100693
chs2r
2003-07-18 12:42
2003.07.31
Как смасштабировать Image


1-100725
laider
2003-07-18 11:45
2003.07.31
как объединить Edit и Button (SpeedButton) в одно (like SpinEdit)


4-101013
dorohov
2003-05-26 15:42
2003.07.31
Нажатие клавиш


14-100940
Dmitriy O.
2003-07-15 11:49
2003.07.31
Как закрыть базы данных


4-101012
llyr
2003-05-26 16:13
2003.07.31
ссылки