tColumnListBox : refresh image

Hi

On event OnDoubleClick, I change image displayed in tColumnListBox component :

        IF list_Code.ListBoxItems.Items[list_Code.ItemIndex].ImageIndex = 3 THEN
        BEGIN
            list_Code.ListBoxItems.Items[list_Code.ItemIndex].ImageIndex := 1;
        END
        ELSE
        BEGIN
            list_Code.ListBoxItems.Items[list_Code.ItemIndex].ImageIndex := 3;
        END; // Fin de IF

However, the change is not visible, even I use :
        list_Code.UpdateControlState;
        list_Code.Update;
        Refresh or Repaint.

The only way is to reload the contents

Whats's wrong ?

Regards
Olivier

Please use:


   Code.BeginUpdate;
    IF list_Code.ListBoxItems.Items[list_Code.ItemIndex].ImageIndex = 3 THEN
        BEGIN
            list_Code.ListBoxItems.Items[list_Code.ItemIndex].ImageIndex := 1;
        END
        ELSE
        BEGIN
            list_Code.ListBoxItems.Items[list_Code.ItemIndex].ImageIndex := 3;
        END; // Fin de IF
   Code.EndUpdate;

Thanks you

it works