Autor Beitrag
cutelaw
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27

Win XP Prof
D5 Prof, D7 Prof, D9 Prof
BeitragVerfasst: Di 02.08.05 08:15 
Hallo :)

Ich habe eine Containerkomponente, bei mir eine ableitung von TCustomPanel. in diese kann der entwickler zur entwicklungszeit controls einfügen, buttons und son kram. den großteil der änderungen an den controls bekomme ich mit, bis auf änderungen der eigenschaft name. es müßte ja auch dafür eine möglichkeit existieren ohne jetzt ein handle zu merken und selber zu prüfen, oder?
Auf ereignisse wie CMControlChange oder AlignControls reagiere ich bereits.

lieben gruß, dani...
KidPaddle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 351

WinXP,Linux
D7 Prof, XE7
BeitragVerfasst: Di 02.08.05 12:00 
Untergeordnete Steuerelemente rufen intern die Methode
ausblenden Delphi-Quelltext
1:
2:
protected
  procedure ValidateRename(AComponent: TComponent; const CurName, NewName: string); virtual;

auf. In dieser Methode wird die Info der Umbennung auch an den Owner weitergeleitet, so daß Du in deinem Steuerelement diese Methode überschreiben must, damit Du die Namensumbennung mit bekommst.

Gruß
Thomas

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
cutelaw Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27

Win XP Prof
D5 Prof, D7 Prof, D9 Prof
BeitragVerfasst: Di 02.08.05 13:02 
ja okay, die unktion kenn ich schon... owner ist bei mir das formular. somit bringt mir das in meinem panel nix. leider. owner ist auch readonly, somit kann ich das nicht einfach auf das panel umleiten.
Aber trotzdem vielen dank ;). Für weitere Vorschläge oder ansätze bin ich weiterhin offen :)
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Di 02.08.05 21:52 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
type
  TMyPanel = class(TCustomPanel)
  protected
    procedure SetName(const Value: TComponentName); override;
  end;

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TMyPanel.SetName(const Value: TComponentName);
begin
  inherited;
end;

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TMyPanel.SetName(const Value: TComponentName);
begin
  inherited;
end;


Was hälst du davon?

_________________
Ciao, Sprint.
cutelaw Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27

Win XP Prof
D5 Prof, D7 Prof, D9 Prof
BeitragVerfasst: Mi 03.08.05 08:51 
Hm... Na ich möchte nicht die Änderung des Namens vom Panel abfangen, sondern von den Controls, die im Panel liegen... Nagut, wenn das noch keiner gemacht hat, dann isses auch nicht so schlimm... hätte mich halt mal interessiert *g*