![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
TStrings [D7, WinXP]
zep © (2004-06-21 11:19:00)подскажите как из TStrings в String перевести
zep (2004-06-21 12:06:00) [1]Digitman © (21.06.04 11:54) [5]
var
MyListBox: TListBox;
..
StringGrid.Cols[индекс_колонки] := MyListBox.Items;
все заработало так. спасибо
pasha_golub (2004-06-21 12:03:00) [2]zep © (21.06.04 11:59) [6]
Ясен пень, а кто тебе сказал, что вновь добалвенная строка сразу станет выделенной во втором листбоксе?
zep (2004-06-21 11:59:00) [3]делаю так но почемуто не выходит
procedure TForm1.Button1Click(Sender: TObject);
begin
if ListBox1.ItemIndex =-1 then exit;
ListBox2.Items.add(ListBox1.Items[ListBox1.ItemIndex]);
ListBox1.Items.Delete(ListBox1.ItemIndex);
StringGrid1.Cells[1,0]:=ListBox2.Items[ListBox2.ItemIndex];
end;
Digitman (2004-06-21 11:54:00) [4]var
MyListBox: TListBox;
..
StringGrid.Cols[индекс_колонки] := MyListBox.Items;
serge (2004-06-21 11:50:00) [5]SG.Cells[Row,Col]:=LB.Items[YourIndex];
zep (2004-06-21 11:49:00) [6]мне надо сторчками с ListBox заполнить столбец в StringGrid
а он выдает ошибку
[Error] Unit1.pas(76): Incompatible types: 'String' and 'TStrings'
Anatoly Podgoretsky (2004-06-21 11:27:00) [7]S := Ss.Text;
serge (2004-06-21 11:23:00) [8]ST : TStrings;
ST.Text [CommaText] ???