Autor Beitrag
galagher
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2556
Erhaltene Danke: 45

Windows 10 Home
Delphi 10.1 Starter, Lazarus 2.0.6
BeitragVerfasst: Fr 22.10.04 19:24 
Hallo!

Ich bastle gerade an einer Komponente TEnhancedCtrl, mit der man diverse Komponenten oder Formulare verändern kann. Dabei soll man sie zur Entwufszeit natürlich sehen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TEnhancedCtrl.Paint;
begin
 inherited Paint;

 Canvas.Brush.Color := Color;
 Canvas.Pen.Color := clBlack;
 with Canvas do
 begin
  Pen.Style := psDash;
  Brush.Style := bsClear;
  Rectangle(00, Width, Height);
 end;
end;

Ein Rahmen also. Wie mache ich den Rahmen zur Laufzeit nun weg - TEnhancedCtrl soll dann unsichtbar sein!
Danke im Voraus!!!

_________________
gedunstig war's - und fahle wornen zerschellten karsig im gestrock. oh graus, es gloomt der jabberwock - und die graisligen gulpen nurmen!
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Fr 22.10.04 20:46 
Hallo,

ich hoffe, ich habe Deine Frage richtig verstanden.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
  ...
  with Canvas do
  begin
    ...
    if (csDesigning in ComponentState) then Rectangle(00, Width, Height)
      else FillRect(ClipRect));
  end;
  ...

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
galagher Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2556
Erhaltene Danke: 45

Windows 10 Home
Delphi 10.1 Starter, Lazarus 2.0.6
BeitragVerfasst: Fr 22.10.04 21:16 
smiegel hat folgendes geschrieben:
ich hoffe, ich habe Deine Frage richtig verstanden.

Ja, danke, das ist es, was ich brauche! :D

Aber eine Frage hab' ich noch - wie kann man die Property's entfernen? Konkret: ich möchte, dass die Komponente kein "Cursor" und kein "Hint" mehr hat. Praktisch das Gegenteil von property. Danke!

_________________
gedunstig war's - und fahle wornen zerschellten karsig im gestrock. oh graus, es gloomt der jabberwock - und die graisligen gulpen nurmen!