AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Problem: Property auslesen

Ein Thema von Scorpion3000 · begonnen am 29. Apr 2004 · letzter Beitrag vom 30. Apr 2004
Antwort Antwort
Scorpion3000

Registriert seit: 18. Apr 2004
47 Beiträge
 
Delphi 7 Enterprise
 
#1

Re: Problem: Property auslesen

  Alt 30. Apr 2004, 06:35
Also:

Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DesignIntf, DesignEditors, StdCtrls;

type
  TConv = class(TForm)
    Editly: TEdit;
    Button1: TButton;
  private
    Label1: TLabeL;
  end;

  TNewComp = class(TComponent)
  public
     FCando: boolean;
     Fcaption: string;
  published
     property Cando: boolean read FCando write FCando;
     property Caption: string read FCaption write FCaption;
  end;

  Editor = class(TPropertyEditor)
  public
     function GetAttributes: TPropertyAttributes; override;
     procedure Edit; override;
  end;

procedure Register;

implementation

{$R *.dfm}
procedure Editor.Edit;
var
  NewComp1: TNewComp;
begin
  with TConv.Create(Application) do
  try
    Button1.Caption:= NewComp1.Fcaption; {Hier möchte ich nun auf das Property von NewComp}
    ShowModal; {zugreifen}
  finally
    Free;
  end;
end;

function Editor.GetAttributes: TPropertyAttributes;
begin
  Result := [paDialog];
end;

procedure Register;
begin
  RegisterComponents('Beispiele',[NewComp]);
  RegisterPropertyEditor(TypeInfo(boolean), nil, '', Editor);
end;
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:05 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz