![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Edit в рамке [D5, Win95/98]
nick_chay © (2002-07-10 16:03:00)Господа, Мастера!
Нужно сделать, чтобы компонент
Edit был белым с черной каемкой.
Помогите, пожалуйста!
Прошу прощения за отнятое время.
Skier (2002-07-12 16:39:00) [1]>nick_chay
Поставил ? Работает ??
nick_chay (2002-07-12 16:37:00) [2]Skier! Благодарю за потраченное на меня время!
А так же всех, кому не в лом помочь
рядовому пользователю.
С уважением, Александр!
Гас (2002-07-12 15:52:00) [3]Да просто эти FlatControls красивее.. Меняют вид при наведении, выглядят более живыми и т.д.. :) А как сделать бордер не черным, а например серым?..
Skier (2002-07-12 15:14:00) [4]Чтобы никто больше не парился вот вам ! :)
unit FrmEd;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TFrameEdit = class(TEdit)
private
protected
procedure CreateWnd; override;
public
constructor Create(AOwner : TComponent); override;
published
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents("Samples", [TFrameEdit]);
end;
{ TFrameEdit }
constructor TFrameEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Color := clWhite;
end;
procedure TFrameEdit.CreateWnd;
begin
inherited CreateWnd;
Ctl3D := False;
end;
end.
Kaban (2002-07-12 15:10:00) [5]Во народ. Им проще в Интернете поискать, чем Сtl3D изменить
Гас (2002-07-12 15:07:00) [6]У AfalinaSoft, по-моему есть такие. А еще можно в инете поискать "Flat controls"..
Skier (2002-07-12 11:20:00) [7]>nick_chay
Компонент выслал. Встречай...
nick_chay (2002-07-12 09:37:00) [8]А поподробнее, если можно...
Гас (2002-07-12 09:18:00) [9]А FlatControls не подходят?...
nick_chay (2002-07-12 07:37:00) [10]Все сделал, скомпилировал,
но теперь, когда размещаю
компонент на форме там лишь
черные маркеры. Почему?
С уважением, nick_chay.
nick_chay (2002-07-11 20:16:00) [11]Skier!
Не знаю как благодарить
за уделенное мне время.
И раз уж так получилось, может
впишешь поправки в код. Спасибо!
На всякий случай вот мой адрес:
stal67@yandex.ru
Skier (2002-07-11 18:55:00) [12]>nick_chay
Ctl3D := False;
Нужно вставлять в procedure CreateWnd(как выяснилось :) )
Skier (2002-07-11 18:14:00) [13]>nick_chay
Давай адрес я тебе вышлю компонент.
nick_chay (2002-07-11 18:01:00) [14]Вот текст ошибок:
[Error] FEdit.pas(22): Undeclared identifier: "TFEdit"
[Error] FEdit.pas(23): Statements not allowed in interface part
[Error] FEdit.pas(24): This form of method call only allowed in methods of derived types
[Error] FEdit.pas(25): Undeclared identifier: "Ctl3D"
[Error] FEdit.pas(26): Undeclared identifier: "Color"
[Error] FEdit.pas(17): Unsatisfied forward or external declaration: "TFrameEdit.Create"
[Error] FEdit.pas(22): Unsatisfied forward or external declaration: "TFEdit"
[Fatal Error] dclusr50.dpk(33): Could not compile used unit "FEdit.pas"
Skier (2002-07-11 16:17:00) [15]>nick_chay
unit FrmEd;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TFrameEdit = class(TEdit)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
constructor Create(AOwner : TComponent); override;
published
{ Published declarations }
end;
constructor TFrameEdit.Create(AOwner : TComponent);
begin
inherited Create(AOwner);
Ctl3D := False;
Color := clWhite;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents("Samples", [TFrameEdit]);
end;
Если не пойдёт - напиши, почему...
Какие ошибки выводит...
nick_chay (2002-07-11 16:08:00) [16]Еще раз помогите!!!
При компиляции компонента идут ошибки.
Что-то я неправильно прописываю.
Помогите с кодом!
Напомню, по умолчанию свойства должны быть
Ctl3D=false, Color = clWhite
unit FrameEdit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TFrameEdit = class(TEdit)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents("Samples", [TFrameEdit]);
end;
nick_chay (2002-07-11 14:13:00) [17]Огромное спасибо, Skier!
С уважением, nick_chay.
Skier (2002-07-11 11:17:00) [18]>nick_chay
TFrameEdit.Create(AOwner : TComponent);
begin
inherited Create(AOwner);
Ctl3D := False;
Color := clWhite;
end;
Всё-таки лучше назвать его TFrameEdit...
nick_chay (2002-07-11 11:15:00) [19]Пробую сделать отдельный компонент FrameEdit на основе TEdit,
но не знаю где нужно отобразить эти свойства ( Ctl3D=false, Color = clWhite), для того
чтобы это был отдельный компонент с этими свойствами по умолчанию.
Вот заготовка. Не сочтите за труд!!!
Спасибо!
unit FrameEdit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
FrameEdit = class(TEdit)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents("Samples", [FrameEdit]);
end;
end.
Skier (2002-07-10 16:19:00) [20]>nick_chay
+ к Игорь Шевченко © (10.07.02 16:15)
Edit1.Color := clWhite