Autor Beitrag
jjturbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 19.12.19 15:03 
Moin Forum,

ich versuche grad ein TEdit zu erstellen(S. Code unten), dummerweise ist es nicht sichtbar. Wenn ich es einfach mal als TLabel erstelle
ausblenden Delphi-Quelltext
1:
2:
type
  TMyEdit = class(TLabel)

dann ist das erzeugt Label zu sehen. Weshalb sehe ich das TEdit nicht?

Dank Euch,
Oliver

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
unit Unit5;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects,
  FMX.StdCtrls, FMX.Edit;




type
  TMyEdit = class(TEdit)
  private
  protected
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  published
  end;


type
  TForm5 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form5   :TForm5;
  myEdit  :TMyEdit;

implementation

{$R *.fmx}





constructor TMyEdit.Create(AOwner: TComponent);
begin

  inherited Create(AOwner);
  Parent           := AOwner as TFmxObject;
  Opacity          := 1;
  Scale.X          := 1;
  Scale.Y          := 1;
  Size.Height      := 22;
  Size.Width       := 66;
  Visible          := True;
  Text             := 'Hallo Du da';
end;


destructor TMyEdit.Destroy;
begin
  inherited destroy;
end;







procedure TForm5.FormCreate(Sender: TObject);
begin
  myEdit            := TMyEdit.Create(Self);
  myEdit.Position.X := 100;
  myEdit.Position.Y := 100;
end;

end.

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 19.12.19 16:34 
Eben versucht: In der VCL funzt es tadellos, nur mit Firemonkey haperts.

In einem FMX Formular TButton, TLabel funktionieren, nur eben Tedit nicht. was ist denn da anders?

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...