Autor Beitrag
area6
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22

win 2000, suse lin 9.1
d6 personal, d7, kylix3
BeitragVerfasst: Do 13.06.02 18:10 
Ein Bild, das ich in einer Form1 in einer ToolBar über einen ToolButton aus einer ImageList auswähle, soll in der Form2 in einem gewöhnlichen Image angezeigt werden, wie geht´s?
Arakis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 344



BeitragVerfasst: Do 13.06.02 19:33 
Titel: Lösung
Hi, versuche es mal hier mit:
ausblenden Quelltext
1:
  form1.ImageList1.GetBitmap(0, form2.Image1.Picture.Bitmap);					


Bis dann
user defined image

_________________
Mit dem Computer löst man Probleme, die man ohne ihn nicht hätte.
Entwickler von SpaceTrek: The New Empire - Siehe Hompage!
Alfons-G
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 307

Win XP Prof, Linux, Win 7
D5 Prof, D7 Architect, D2005 Architect, D2007 Architect
BeitragVerfasst: Do 13.06.02 19:50 
Ergänzung:
Der erste Parameter von GetBitmap ist der Index des Bildes in der ImageList. Du musst in der onClick-Prozedur der Toolbuttons GetBitmap mit dem Index des jeweiligen Bildes und der Bitmap Deines Images aufrufen.

:)

_________________
Alfons Grünewald
Arakis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 344



BeitragVerfasst: Do 13.06.02 19:57 
Titel: Noch einfacher
Und damit man nicht bei jedem Button den induviduellen Index übergeben muss, kann man das ganze noch automatisieren:
ausblenden Quelltext
1:
form1.ImageList1.GetBitmap((Sender as TToolButton).ImageIndex, form2.Image1.Picture.Bitmap);					

Für den Fall, dass man mal den Index ändert :wink:

Bis dann
user defined image

_________________
Mit dem Computer löst man Probleme, die man ohne ihn nicht hätte.
Entwickler von SpaceTrek: The New Empire - Siehe Hompage!
area6 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22

win 2000, suse lin 9.1
d6 personal, d7, kylix3
BeitragVerfasst: So 16.06.02 12:49 
Titel: oh, wie krass einfach ... danke
... :shock: ... jetzt funktionierts, mit den zwei süssen Zeilen, sagt mal, funktioniert das auch mit anderen Komponenten, daß man die quasi im source anklickt?
Arakis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 344



BeitragVerfasst: Mo 17.06.02 07:34 
Ich verstehe nicht ganz was du meinst :?

Bis dann
user defined image

_________________
Mit dem Computer löst man Probleme, die man ohne ihn nicht hätte.
Entwickler von SpaceTrek: The New Empire - Siehe Hompage!
webmaker
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 205



BeitragVerfasst: Di 18.06.02 20:39 
Wenn du das meinst was ich denke.... :shock:

Ja, klar geht das

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