Главная страница
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.022 c
1-100709
GSergei
2003-07-18 14:53
2003.07.31
Запущена ли служба?


1-100667
Sensor
2003-07-18 04:41
2003.07.31
Edit2.Text минус Edit1.Text


1-100793
ramdy
2003-07-17 10:22
2003.07.31
stringgrid focused cell


6-100863
Paylik
2003-05-26 16:47
2003.07.31
Модем


14-100966
sapsi
2003-07-15 08:20
2003.07.31
Пересечение границы Украины