Jump to content

_GUICtrlListViewInsertItem & Icons


 Share

Recommended Posts

Hiya,

I've searched for a while, tested lots of things but i couldn't get it to work so here it goes.

I am using _GUICtrlListViewSetItemText and _GUICtrlListViewInsertItem to fill my listview. The reason i am doing this is for customization: people can change the column order and width, so i'm kinda stuck to those two.

Now i want to add icons in front of the entries, in column 0.

I tried

GUICtrlSetImage($ListView, @ScriptDir & "\icons\" & $Icon, 0)oÝ÷ Ù8Z·
+Æ,¢Ú²&u©è¶«¢w¢µÈZ¬²íè¢{"Ø^+-¾'°¶azÞ±ëméZµë-êÞƬ*izÚ¶¡×ºÚ"µÍBBBBIÌÍÛ]Ñ[HHÑÕRPÝÝY]Ò[Ù][J  ÌÍÓÝY]Ë    ÌÍÜÜÚ][Û  ÌÎNÉÌÎNÊBBBBBWÑÕRPÝÝY]ÔÙ]][U^
    ÌÍÓÝY]Ë    ÌÍÛ]Ñ[K ÌÍØÛÛ[[ÒXÛÛ ][ÝÉ][ÝÊBBBBBQÕRPÝÙ][XYÙJ   ÌÍÓÝY]ËØÜ    [È ][ÝÉÌLÚXÛÛÉÌLÉ][ÝÈ   [È ÌÍÒXÛÛ
BBBBBWÑÕRPÝÝY]ÔÙ]][U^
    ÌÍÓÝY]Ë    ÌÍÛ]Ñ[K ÌÍØÛÛ[[ÔÝ]K  ÌÍÔÝ]JBBBBBWÑÕRPÝÝY]ÔÙ]][U^
    ÌÍÓÝY]Ë    ÌÍÛ]Ñ[K ÌÍØÛÛ[[ÕÛÜÜË  ÌÍÕÛÜÜÊBBBBBWÑÕRPÝÝY]ÔÙ]][U^
    ÌÍÓÝY]Ë    ÌÍÛ]Ñ[K ÌÍØÛÛ[[ÕÝY   ÌÍÕÝY

I tried the GUiCtrlSetImage on $newEntry but that doesn't work. I also tried the _GuiCtrlSetImage function i found floating around.

I hope someone can help me out with this, as i have a hunch this can be solved quite quickly, and that i am overlooking something.

Thanks in advance!

Link to comment
Share on other sites

GUICtrlSetImage($ListView, @ScriptDir & "\icons\" & $Icon, 0)

Hi,

I think adding it to the "ListView" itself will add to the last created item; as you have no created items (added ones are not created as objects), you are just changing the default icon each time;

Either

1. CreateItems; then use this command after each one with "-1" instead of listview (or itemize them in an array, then use their handle name.)

or

2. use gafrost's method ; examples available; search his name and "images"; I think it works still with Created items?

or

3. try PaulIA's library "A3L" ; its a sticky; I think it works still with Inserted items?

Best, Randall

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...