Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "KOL";
Текущий архив: 2006.01.22;
Скачать: [xml.tar.bz2];

Вниз

Сохранить все позиции 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 вся ветка

Форум: "KOL";
Текущий архив: 2006.01.22;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.041 c
9-1123271153
Cash
2005-08-05 23:45
2006.01.22
Counter Line v0.130a


1-1134642411
IceBeerg
2005-12-15 13:26
2006.01.22
Полупрозрачная форма и текст на ней.


6-1129205876
Kimer
2005-10-13 16:17
2006.01.22
Отправка e-mail


14-1135751515
Vale
2005-12-28 09:31
2006.01.22
Компиляция со сдвигом


9-1123607260
Yegorchic
2005-08-09 21:07
2006.01.22
А загрузить .max файл через GLScene нельзя?





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский