Форум: "Основная";
Текущий архив: 2002.12.23;
Скачать: [xml.tar.bz2];
ВнизПомогите! Найти похожие ветки
← →
MegaVoltik (2002-12-10 14:46) [0]Дорогие мастера!
Подскажите, пожалуста, как понажатию какойто кнопки заставить редактироватся выбраный итем в листвью
case Key of
VK_F2:TListView.Items.Item[0].EditCaption:=true - вот это не работает:(
← →
NailS (2002-12-10 14:56) [1]
> TListView.Items.Item[0].EditCaption
Понеслась.
Почему не работает
1)TListView - это все таки тип, а не объект
2)EditCaption - а это процедура, а не свойство ;)
← →
AlexandrN (2002-12-10 15:09) [2]Напиши в обработчике для ListView код, жми F2 - редакьтируем, жмёшь ENTER - применяем изменения к элементу.
void __fastcall TForm1::ListView1KeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if ( Key == VK_F2 ) ListView1->Items->Item[ListView1->Selected->Index]->EditCaption();
if ( Key == VK_RETURN ) ListView1->Items->Item[ListView1->Selected->Index]->CancelEdit();
}
//---------------------------------------------------------------------------
← →
MegaVoltik (2002-12-10 15:09) [3]2NailS © (10.12.02 14:56)
1) я знаю просто ошибся, у меня в коде listview1
2)
Begins in-place editing of the list item"s caption.
function EditCaption: Boolean;
Description
Call EditCaption to put the list item into edit mode. Before bringing up the in-place editor for the item’s caption, EditCaption makes the item the only selected item in the list view and gives it input focus.
Сдесь написано, что можна присвоить а делфи ругается, что присваивать нельзя:(((
← →
han_malign (2002-12-10 15:17) [4]Call EditCaption to put the list item into edit mode.
← →
han_malign (2002-12-10 15:19) [5]Lingvo: call - 1. вызов; обращение || вызывать; обращаться 2. запрос || запрашивать 3. переход к подпрограмме 4. заявка
← →
NailS (2002-12-10 15:56) [6]
> Сдесь написано, что можна присвоить а делфи ругается, что
> присваивать нельзя:(((
А если подумать?
У тебя есть функция, а ты хочешь ей присвоить значение типа boolean ;)))
← →
han_malign (2002-12-10 16:18) [7]function BFunc: boolean;
begin Result:=false; end;
const bb: boolean=1;
begin
move(bb,pointer(@DFunc)^,1);
:)))))))))))))
← →
Fernis (2002-12-13 07:01) [8]Красиво!
if ( Key == VK_RETURN ) ListView1->Items->Item[ListView1->Selected->Index]->CancelEdit();
ЕСли нажал Энтер то все что наредактировал - зря...
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2002.12.23;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.009 c