Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.01.22;
Скачать: CL | DM;

Вниз

Сохранить все позиции ListBox a, а затем их вернуть как?   Найти похожие ветки 

 
sormy   (2005-05-24 23:39) [0]

Допустим, проскроллен ЛистБокс на какую-то позицию.
Как ее вычислить, сохранить и затем обратно вернуть?...
Фишка с ItemSelected прокатывает, но не так как хотелось бы - т.е. чтоб один в один позиция совпадала в конечном счете ...


 
Thaddy   (2005-05-25 00:41) [1]

Listbox.perform(LB_SETITEMDATA,ItemIndex,TheIdentifier);
Value:=ListBox.Perfprm(LB_GETITEMDATA,ItemIndex,0);

Will that help?


 
sormy   (2005-05-25 08:19) [2]

What is Value, ItemIndex and TheIdentifier in first and second string?


 
Thaddy   (2005-05-25 12:41) [3]

The item index is the index of the string in the listbox
The identifier is the value that you yourself associate with that string.
The value of the function is the returned identifier of the string based on the current index of the string in the listbox.
So if you delete a string the identifiers of the other strings will always be the same, although the index of the strings may change.
That covers exactly what you want, doesn"t it?


 
Sormy   (2005-05-25 20:33) [4]

Thanks!

I had done this in such way:

   lbSelectedItem:=ListBox1.CurIndex;
   lbTopIndex:=ListBox1.Perform(LB_GETTOPINDEX, 0, 0);

//operations with list edit

   ListBox1.Perform(LB_SETTOPINDEX, lbTopIndex, 0);
   ListBox1.curindex:=lbSelectedItem;



Страницы: 1 вся ветка

Текущий архив: 2006.01.22;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.03 c
1-1134635289
oleggar
2005-12-15 11:28
2006.01.22
C+Delphi


14-1135962701
palva
2005-12-30 20:11
2006.01.22
С новым Годом и небольшой подарок


14-1135494365
Mozart
2005-12-25 10:06
2006.01.22
Лунный цикл


14-1135768467
Mike Kouzmine
2005-12-28 14:14
2006.01.22
А вы знаете, что такое форель?


14-1135416752
Витёк
2005-12-24 12:32
2006.01.22
Как узнать число простое или нет?