![]() |
komponente erstellen: Tlabel
hallo zusammen,
ich versuche verzweifel ein komponente slber zu schriben. ich ich habe scho vieles probiert aber ich schaff es einfach nicht. könnt ihr mir sagen wie ich das machen muss?
Delphi-Quellcode:
muss ich in der prozedur "rect" irgend was besonderes machen?
unit Rect;
interface uses Windows, Messages, SysUtils, Classes, QControls, QStdCtrls; type TRect = class(tlabel) private { Private declarations } protected { Protected declarations } public Procedure rect; published { Published declarations } end; procedure Register; implementation procedure Register; begin RegisterComponents('Samples', [TRect]); end; procedure TRect.rect; begin TRect.create(self); end; end. danke im vorraus |
Re: komponente erstellen: Tlabel
Êrst mal umbennen. TRect ist ein Delphi eigener Datentyp.
Und ansonsten würde ich erstmal Tutorials zu OOP und Komponentenentwicklung empfehlen. |
Re: komponente erstellen: Tlabel
ok hab meinen code geändert:
Delphi-Quellcode:
geht aber trotzdem nicht die tutroials hab ich gelesen bringt mir aber nix! muss ich noch den parent des label bestimmen?
unit test;
interface uses Windows, Messages, SysUtils, Classes, QControls, QStdCtrls; type Ttest = class(tlabel) private { Private declarations } protected { Protected declarations } public Procedure neu; published { Published declarations } end; procedure Register; implementation procedure Register; begin RegisterComponents('Samples', [Ttest]); end; procedure Ttest.neu; begin Ttest.create(self); end; end. danke im vorraus |
Re: komponente erstellen: Tlabel
Zitat:
|
Re: komponente erstellen: Tlabel
hab ich des falsche tutorial? schrib mal bitte den link
|
Re: komponente erstellen: Tlabel
Ein Konstruktor (oder auch: Constructor) sollte eigentlich in jedem Komponenten-Tutorial erklärt werden.
Aber schau dir mal das Tutorial hier im Forum (Kategorie: Tutorials und Kurse) an. Oder geh mal auf ![]() |
Re: komponente erstellen: Tlabel
Das hat aber nur mit OOP zu tun und sehr wenig mit Komponentenentwicklung.
|
Re: komponente erstellen: Tlabel
Schau Dir mal meinen "Monster-Thread" an :
![]() Und das ist nicht alles :!: Also Vorsicht, einfach wird das nicht. |
Re: komponente erstellen: Tlabel
hi,
für was ein Tutorial? Mit etwas Ahnung von Klassen und Vererbung kannst du das selber. Es gibt in der Delphi Hilfe ein relativ grosses Kapitel zur Komponenteneentwicklung. Wenn du nicht weiter kommst schick mir ne Mail ( privat ) ketraun |
Re: komponente erstellen: Tlabel
jetzt bin ich ganz verwirrt!
antwortet ihr eigentlich zu meiner frage? ps: ich habs immer noch nicht geschafft gruß christoph |
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:27 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 by Thomas Breitkreuz