Add new entry on Listview's first position
Posted
#1
(In Topic #1085)
Trainee
Has anyone tries to add a new entry at first position to a Listview? You can use the .Add() method, but it adds only after another entry or at the end of the list:
Code (gambas)
- ' after is a valid key within the Listview or null (at the end)
- lv.Add(mykey, mytext, mypicture, after)
Best regards
Witchi
Posted
Regular

Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Trainee
Posted
Regular

Posted
Regular

I suppose like the item with key "bbb" or "ccc" ?thatbruce said
What if "aaa" is not the first item?
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Guru

ListView1.Add("ddd", "ddd", Null, Null).MoveFirst()
/comp/gb.qt4/_treeview_item/movefirst - Gambas Documentation
Posted
Regular

…exactly.BruceSteers said
Use ListItem.MoveFirst() instead.
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
1 guest and 0 members have just viewed this.


