Autor Beitrag
dsJena
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 25

Windows Vista

BeitragVerfasst: Do 28.12.06 16:21 
Hallo, ich bin gerade dabei einen Texteditor mit "Tabbed Browsing" zu programmieren. Ein Button mit der Funktion "Neuer Tab..." funktioniert schon ohne Weiteres. Nun möchte ich aber auf die neu erstellte Seite auch eine TRichEdit-Komponente haben; das bekomme ich nicht hin.

Danke für die Hilfe!
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: Do 28.12.06 16:51 
Du musst ein RichEdit dynamisch erzeugen und Parent auf Das neue Tab setzen

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
dsJena Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 25

Windows Vista

BeitragVerfasst: Do 28.12.06 16:54 
Soweit war ich ja auch schon, nur wie? Ich habe es mit Richedit.Create gemacht, funktioniert hat's nicht so richtig.
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Do 28.12.06 17:10 
user profile icondsJena hat folgendes geschrieben:
Soweit war ich ja auch schon, nur wie? Ich habe es mit Richedit.Create gemacht, funktioniert hat's nicht so richtig.

Wenn du mehrere Tabs erstellen lassen willst, dann nimm entweder eine verkettete Liste oder ein array of TRichEdit.
Erstellen tust du ein Richedit so
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
var MyRichedit: TRichEdit;

MyRichEdit := TRichEdit.Create; //Ob da in Klammern noch der Owner hinmuss, weiß ich ATM nicht...
MyRichEdit.Parent := Self;
MyRichEdit.Left := XX;
MyRichEdit.Width := XX;
MyRichEdit.Height := XX;
MyRichEdit.Top := XX;

//Im OnDestroy alle wieder freigeben
FreeAndNil(MyRichEdit);

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot