Autor Beitrag
moloch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Do 09.12.04 10:18 
hallo Forum,
kann mir mir jemand helfen wie ich wärend der Laufzeit dem menu einträge hinzufüge?

mfg
moloch
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 09.12.04 10:24 
Shau mal in der Hilfe unter TMenu.Items.Add nach.
moloch Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Do 09.12.04 11:06 
hey,
also ich habe schon den festen Menüpunkt "Drucker".
Und jetzt möchte ich beim kreieren des Formulars die Drucker als Einträge hinzufügen.Ich kriege das irgendwie nicht hin.auch nicht mit der Hilfe.

mfg
moloch
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 09.12.04 11:10 
Bitte genauer.
Was bekommst du nicht hin?
Wird kein Menüeintrag erzeugt?
Fehlt die Funktionalität?

Wie weit bist du denn gekommen? Zeig mal Source.
moloch Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Do 09.12.04 11:28 
ok ich habs geschafft.dank dir.
mfg
moloch

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
  Liste := TStringList.create;
  try
    GetDruckerListe(Liste);
    for i := 0 to Liste.count - 1 do begin
      NewItem := TMenuItem.Create(Self);
      NewItem.Caption := Liste[i];
      MainMenu1.Items[2].Add(NewItem);
    end;

  finally
    Liste.free;
  end;


aber eine frage hab ich noch.
muss ich diese objekte dann selber frei machen?
und wenn wie?

Moderiert von user profile iconUGrohne: Topics gemerged.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 09.12.04 11:39 
Dein MainMenu hast du vermutlich nicht zur Laufzeit generiert. Beim beenden wird dieses also automatisch frei gemacht. Alle Objekte die darangehängt sind, werden auch entsprechend frei gemacht.
Also brauchst du dich nicht selbst darum kümmern.
moloch Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Do 09.12.04 11:47 
ok danke schön.
wünsch dir noch einen schönen tag wenn wir uns nicht hören bis dann
moloch