Subject | Re: [IBO] Framed Edit controls? |
---|---|
Author | Paul Gallagher |
Post date | 2002-04-15T00:09:34Z |
Just for the fun of it, I threw this simple code in my app and it gave me
the effect I needed. I don't know if adding a couple hundred TShape
components to an app has any serious impact on memory or performance, but
initially it seemed to work fine. Simple modifications to this code would
trap the TIB_LookupCombos, etc...
procedure TfrmMain.FormCreate(Sender: TObject);
var
i: integer;
sh: TShape;
begin
for i := 0 to frmMain.ComponentCount - 1 do
begin
if frmMain.Components[i].ClassType = TIB_Edit then
begin
(frmMain.Components[i] as TIB_Edit).BorderStyle := bsNone;
(frmMain.Components[i] as TIB_Edit).AutoLabel.Margin := 0;
sh := TShape.Create(application);
if (frmMain.Components[i] as TIB_Edit).Left = 0 then
(frmMain.Components[i] as TIB_Edit).Left := 1;
(frmMain.Components[i] as TIB_Edit).Height := 14;
sh.Parent := (frmMain.Components[i] as TIB_Edit).Parent;
sh.Left := (frmMain.Components[i] as TIB_Edit).Left - 1;
sh.Top := (frmMain.Components[i] as TIB_Edit).Top - 1;
sh.Width := (frmMain.Components[i] as TIB_Edit).Width + 2;
sh.Height := (frmMain.Components[i] as TIB_Edit).Height + 2;
sh.Pen.Color := clCharcoal;
sh.Pen.Width := 1;
end;
end;
end;
""Paul Gallagher"" <paul@...> wrote in message
news:a9clek$9mn$1@......
the effect I needed. I don't know if adding a couple hundred TShape
components to an app has any serious impact on memory or performance, but
initially it seemed to work fine. Simple modifications to this code would
trap the TIB_LookupCombos, etc...
procedure TfrmMain.FormCreate(Sender: TObject);
var
i: integer;
sh: TShape;
begin
for i := 0 to frmMain.ComponentCount - 1 do
begin
if frmMain.Components[i].ClassType = TIB_Edit then
begin
(frmMain.Components[i] as TIB_Edit).BorderStyle := bsNone;
(frmMain.Components[i] as TIB_Edit).AutoLabel.Margin := 0;
sh := TShape.Create(application);
if (frmMain.Components[i] as TIB_Edit).Left = 0 then
(frmMain.Components[i] as TIB_Edit).Left := 1;
(frmMain.Components[i] as TIB_Edit).Height := 14;
sh.Parent := (frmMain.Components[i] as TIB_Edit).Parent;
sh.Left := (frmMain.Components[i] as TIB_Edit).Left - 1;
sh.Top := (frmMain.Components[i] as TIB_Edit).Top - 1;
sh.Width := (frmMain.Components[i] as TIB_Edit).Width + 2;
sh.Height := (frmMain.Components[i] as TIB_Edit).Height + 2;
sh.Pen.Color := clCharcoal;
sh.Pen.Width := 1;
end;
end;
end;
""Paul Gallagher"" <paul@...> wrote in message
news:a9clek$9mn$1@......
> Jason,to
> Have you given any thought to making IBO edit controls "framed", similar