Autor Beitrag
webmaker
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 205



BeitragVerfasst: So 06.07.03 17:34 
Hi,
ich möchte ganz gerne ein TIcon in eine PopUp-Menu (neben ein Item) per Code hinzu fügen.
Hat irgednwer ne Idee wie das geht?

_________________
.::Wissen ist Macht, nichts wissen macht nichts::.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 06.07.03 18:56 
jepp. du nimmst eine imagelist und fügst die icons halt hinzu.

wenn das ganze per laufzeit geschehen soll. bruachst du auch ne imagelist. da gibts ne funktion addicon oder so. die kann ein Ticon in die Imagelist aufnehmen. und dann kannste super einfach per imageindex eingenschaft des menüitems das einzeigen lassen.

das ist jetzt so die erstbeste methode die mir einfällt. es gibt sicher auch was eleganteres....

_________________
In the beginning was the word.
And the word was content-type: text/plain.
webmaker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 205



BeitragVerfasst: So 06.07.03 21:45 
mhm wollte das eigentlich ohne ImageList machen. Aber nun ja wenn niemand, was besseres weiß, werde ich es ohne machen...

_________________
.::Wissen ist Macht, nichts wissen macht nichts::.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 06.07.03 22:38 
Was ist an der Methode mit der ImageList nicht elegant? Das ist meiner Meinung nach die einzig brauchbare Lösung.
Was spricht also dagegen?
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 07.07.03 13:57 
ja ich dachte nur, dass es bestimmt auch anders geht ohne den umweg über die ImgList.

aber es geht !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
webmaker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 205



BeitragVerfasst: Mo 07.07.03 18:21 
mhm eigentlich habt ihr recht, aber ist für meine Zwecke nicht unbedingt nötig dieser Aufwand.
Bei mir würde es reichen, wenn man gleich als Bitmap das Icon ins Menü einfügen könnte. Aber so geht es auch falls ich denn doch noch mal die Icons so benötige...

_________________
.::Wissen ist Macht, nichts wissen macht nichts::.