Autor Beitrag
Zappt
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mo 01.06.09 19:36 
ich suche ne Möglichkeit in Delphi zwischen verscheidenen "tabs" zu switchen.

Ich weiß nimmer wies ging ;(

Thx
Zappt

Ungefähr wie auf diesem Bild:
Einloggen, um Attachments anzusehen!


Zuletzt bearbeitet von Zappt am Sa 20.06.09 12:00, insgesamt 2-mal bearbeitet
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 01.06.09 19:40 
Meinst Du das Setzen von TabIndex?
Zappt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mo 01.06.09 19:40 
wenn es das ist gerne ;) wie geht das?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 01.06.09 19:41 
Das sieht nach dem alten Windows 3.1 TabbedNotebook aus, kann das sein? Benutze am besten TPageControl, dort kannst du dann ActivePage oder ActivePageIndex (je nach Wunsch) setzen.
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 01.06.09 19:43 
Wie setzt man denn eine Eigenschaft? Durch Zuweisung:
ausblenden Delphi-Quelltext
1:
DeinTabControl.TabIndex := 0;					
Zappt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mo 01.06.09 19:44 
kay thx soweit so gut und wie wechsle ich zwischen den einzelnen?
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 01.06.09 19:45 
Was meinst Du?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 01.06.09 19:47 
Wenn du jetzt TPageControl benutzt, setzt du wie gesagt ActivePage oder ActivePageIndex.
ausblenden Delphi-Quelltext
1:
2:
3:
PageControl1.ActivePage := TabSheet1;
// oder:
PageControl1.ActovePageIndex := 0;
Und wenn du TabControl oder son Zeug benutzt, hat es user profile iconDeddyH ja schon geschrieben.
Zappt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mo 01.06.09 19:49 
ich versuchs mal thx
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 01.06.09 19:49 
Laut Delphi 2007-Hilfe kann man TabIndex auch für ein TPageControl verwenden.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 01.06.09 19:51 
Stimmt, hab ich nie versucht. :lol:
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 01.06.09 19:52 
F1 often helps ;)
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 01.06.09 19:54 
Da kommt nur die Hilfe zu Google Chrome. :mrgreen:
Ich hab nur Visual Studio offen, aber ich bin auch gar nicht auf die Idee gekommen, dass es das da auch gibt, ich hatte ja immer ActivePage. :mrgreen:
Egal, funktioniert ja beides. ;-)
Zappt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mo 01.06.09 20:12 
Soweit so gut...

wie schreib ich jetzt was in tab 2?

Thx!

(bin noch anfänger)
Einloggen, um Attachments anzusehen!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 01.06.09 20:13 
Du hast ja doch ein TabControl. Das ist nur zur Anzeige der Tabs, nicht zur Verwaltung mehrerer Seiten...
Wenn du das nicht selbst machen willst, wenn ein Tab umgeschaltet wird, (also den Inhalt entsprechend ändern) dann nimm TPageControl wie ich sagte...
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 01.06.09 20:16 
Drück Dich doch mal genauer aus. "Wie schreib ich was in Tab2" sagt mir gar nichts.
Zappt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mo 01.06.09 20:30 
Wo finde ich TPageControl ?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 01.06.09 20:33 
Unter Win32, direkt unter (bzw. bei deinem alten Delphi rechts neben) TTabControl...
Zappt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mo 01.06.09 20:51 
user profile iconjaenicke hat folgendes geschrieben Zum zitierten Posting springen:
Unter Win32, direkt unter (bzw. bei deinem alten Delphi rechts neben) TTabControl...


Okay soweit.

Wie mach ich jetzt einen zweiten tab? (registrierkarte) bzw. beschrifte den ersten tab?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 01.06.09 20:58 
Rechte Maustaste auf dein PageControl --> Neuer Tab.