<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ImageList Icons dynamisch ändern &#x2F; tauschen]]></title><description><![CDATA[<p>Beim Testen der Problemlösung kam volgender Text zusammen (Siehe unten)</p>
<p>Form besteht aus:<br />
1x ListView<br />
2x ImageList (Jeweils schon gefüllt)</p>
<p>ListView wird eingestellt (RowSelect / ViewStyle)<br />
5 ListColumns werden angelegt<br />
ListView1 wird ImageList1 zugewiesen</p>
<p>Schleife 1 soll durchlaufen (Macht sie auch, nur nicht mit den richtigen Icons)</p>
<p>ListView1 wird ImageList2 zugewiesen</p>
<p>Schleife 1 soll durchlaufen (Macht sie auch, nur nicht mit den richtigen Icons)</p>
<p>Es soll also zu jedem Eintrag der Imagelist1 ein Eintrag in der ListView1 gemacht werden und anschließend das Gleiche mit der ImageList 2.</p>
<p>Danke für eure Bemühungen. Es wird hoffendlich jemand hinbekommen<br />
==&gt;Eisbeer&lt;==</p>
<pre><code class="language-cpp">Form1-&gt;ListView1-&gt;ViewStyle = vsReport;
Form1-&gt;ListView1-&gt;RowSelect = true;

TListColumn *MeinLinkesColumn;
MeinLinkesColumn = Form1-&gt;ListView1-&gt;Columns-&gt;Add();
MeinLinkesColumn-&gt;Width = 85;
MeinLinkesColumn-&gt;Caption = &quot;1&quot;;

MeinLinkesColumn = Form1-&gt;ListView1-&gt;Columns-&gt;Add();
MeinLinkesColumn-&gt;Width = 50;
MeinLinkesColumn-&gt;Caption = &quot;2&quot;;

MeinLinkesColumn = Form1-&gt;ListView1-&gt;Columns-&gt;Add();
MeinLinkesColumn-&gt;Width = 60;
MeinLinkesColumn-&gt;Caption = &quot;3&quot;;

MeinLinkesColumn = Form1-&gt;ListView1-&gt;Columns-&gt;Add();
MeinLinkesColumn-&gt;Width = 120;
MeinLinkesColumn-&gt;Caption = &quot;4&quot;;

MeinLinkesColumn = Form1-&gt;ListView1-&gt;Columns-&gt;Add();
MeinLinkesColumn-&gt;Width = 42;
MeinLinkesColumn-&gt;Caption = &quot;5&quot;;

Form1-&gt;ListView1-&gt;SmallImages = Form1-&gt;ImageList1;

for(int zaehler = 0; zaehler &lt; Form1-&gt;ImageList1-&gt;Count; zaehler++)
        {
        Form1-&gt;ListView1-&gt;SmallImages = Form1-&gt;ImageList1;
        TListItem *MeinLinkesItem;
        MeinLinkesItem = Form1-&gt;ListView1-&gt;Items-&gt;Add();
        MeinLinkesItem-&gt;ImageIndex = zaehler;
        MeinLinkesItem-&gt;Caption = &quot;1&quot;;
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;2&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;&lt;3&gt;&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;4&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;5&quot;);
        }

Form1-&gt;ListView1-&gt;SmallImages = Form1-&gt;ImageList2;
for(int zaehler = 0; zaehler &lt; Form1-&gt;ImageList2-&gt;Count; zaehler++)
        {
        Form1-&gt;ListView1-&gt;SmallImages = Form1-&gt;ImageList2;
        TListItem *MeinLinkesItem;
        MeinLinkesItem = Form1-&gt;ListView1-&gt;Items-&gt;Add();
        MeinLinkesItem-&gt;ImageIndex = zaehler;
        MeinLinkesItem-&gt;Caption = &quot;1&quot;;
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;2&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;&lt;3&gt;&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;4&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;5&quot;);
        }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/204345/imagelist-icons-dynamisch-ändern-tauschen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 19 Aug 2026 13:23:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/204345.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 01 Feb 2008 22:39:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ImageList Icons dynamisch ändern &#x2F; tauschen on Fri, 01 Feb 2008 22:39:58 GMT]]></title><description><![CDATA[<p>Beim Testen der Problemlösung kam volgender Text zusammen (Siehe unten)</p>
<p>Form besteht aus:<br />
1x ListView<br />
2x ImageList (Jeweils schon gefüllt)</p>
<p>ListView wird eingestellt (RowSelect / ViewStyle)<br />
5 ListColumns werden angelegt<br />
ListView1 wird ImageList1 zugewiesen</p>
<p>Schleife 1 soll durchlaufen (Macht sie auch, nur nicht mit den richtigen Icons)</p>
<p>ListView1 wird ImageList2 zugewiesen</p>
<p>Schleife 1 soll durchlaufen (Macht sie auch, nur nicht mit den richtigen Icons)</p>
<p>Es soll also zu jedem Eintrag der Imagelist1 ein Eintrag in der ListView1 gemacht werden und anschließend das Gleiche mit der ImageList 2.</p>
<p>Danke für eure Bemühungen. Es wird hoffendlich jemand hinbekommen<br />
==&gt;Eisbeer&lt;==</p>
<pre><code class="language-cpp">Form1-&gt;ListView1-&gt;ViewStyle = vsReport;
Form1-&gt;ListView1-&gt;RowSelect = true;

TListColumn *MeinLinkesColumn;
MeinLinkesColumn = Form1-&gt;ListView1-&gt;Columns-&gt;Add();
MeinLinkesColumn-&gt;Width = 85;
MeinLinkesColumn-&gt;Caption = &quot;1&quot;;

MeinLinkesColumn = Form1-&gt;ListView1-&gt;Columns-&gt;Add();
MeinLinkesColumn-&gt;Width = 50;
MeinLinkesColumn-&gt;Caption = &quot;2&quot;;

MeinLinkesColumn = Form1-&gt;ListView1-&gt;Columns-&gt;Add();
MeinLinkesColumn-&gt;Width = 60;
MeinLinkesColumn-&gt;Caption = &quot;3&quot;;

MeinLinkesColumn = Form1-&gt;ListView1-&gt;Columns-&gt;Add();
MeinLinkesColumn-&gt;Width = 120;
MeinLinkesColumn-&gt;Caption = &quot;4&quot;;

MeinLinkesColumn = Form1-&gt;ListView1-&gt;Columns-&gt;Add();
MeinLinkesColumn-&gt;Width = 42;
MeinLinkesColumn-&gt;Caption = &quot;5&quot;;

Form1-&gt;ListView1-&gt;SmallImages = Form1-&gt;ImageList1;

for(int zaehler = 0; zaehler &lt; Form1-&gt;ImageList1-&gt;Count; zaehler++)
        {
        Form1-&gt;ListView1-&gt;SmallImages = Form1-&gt;ImageList1;
        TListItem *MeinLinkesItem;
        MeinLinkesItem = Form1-&gt;ListView1-&gt;Items-&gt;Add();
        MeinLinkesItem-&gt;ImageIndex = zaehler;
        MeinLinkesItem-&gt;Caption = &quot;1&quot;;
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;2&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;&lt;3&gt;&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;4&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;5&quot;);
        }

Form1-&gt;ListView1-&gt;SmallImages = Form1-&gt;ImageList2;
for(int zaehler = 0; zaehler &lt; Form1-&gt;ImageList2-&gt;Count; zaehler++)
        {
        Form1-&gt;ListView1-&gt;SmallImages = Form1-&gt;ImageList2;
        TListItem *MeinLinkesItem;
        MeinLinkesItem = Form1-&gt;ListView1-&gt;Items-&gt;Add();
        MeinLinkesItem-&gt;ImageIndex = zaehler;
        MeinLinkesItem-&gt;Caption = &quot;1&quot;;
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;2&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;&lt;3&gt;&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;4&quot;);
        MeinLinkesItem-&gt;SubItems-&gt;Add(&quot;5&quot;);
        }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1447868</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1447868</guid><dc:creator><![CDATA[Eisbeer]]></dc:creator><pubDate>Fri, 01 Feb 2008 22:39:58 GMT</pubDate></item></channel></rss>