Вниз
Скачать: CL | DM;

В чем ошибка?   Найти похожие ветки 

← →
anod ©   (2002-04-18 21:22) [0]

procedure TForm1.DirListMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var s:string;
begin
if DirList.GetItemAt(x,y).Index<>-1 then
s:=DirList.GetItemAt(x,y).Caption; //Вот здесь выдает ошибку
//Access violation .....
DirList.Hint:=trim(copy(s,5,length(s)));
end;


← →
ION T ©   (2002-04-18 21:39) [1]

Ты в дебаггере глянь шо там за координаты в х,у (может они относительны к экрану или форме и надо пересчитывать)


← →
anod ©   (2002-04-18 21:44) [2]

Раньше был ListBox - все работало, а это переделал на ListView
Был код:
pt.x:=x; pt.y:=y;
if DirList.ItemAtPos(pt,true)<>-1 then
s:=DirList.Items[DirList.ItemAtPos(pt,true)];
DirList.Hint:=trim(copy(s,5,length(s)));


← →
anod ©   (2002-04-18 21:48) [3]

Ну то что не к экрану это точно, а к форме?


← →
anod ©   (2002-04-18 21:49) [4]

Нет, вроде все нормально


← →
ION T ©   (2002-04-18 21:53) [5]

Дурак я;)

procedure TForm1.DirListMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var s:string;
begin
if DirList.GetItemAt(x,y)<> nil then
s:=DirList.GetItemAt(x,y).Caption; //


← →
anod ©   (2002-04-18 21:55) [6]

Спасибо, я просто взял из ListBox"a и переписал...



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

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.006 c
1-2554
OlegG
2002-04-16 09:01
2002.05.02
dll + String +PChar


1-2549
vicha
2002-04-18 23:46
2002.05.02
передача файловой переменной в функцию?


4-2727
JAndrey
2002-02-28 07:11
2002.05.02
Как запустить и остановить Скрин Сервер?


1-2603
Лана Розанова
2002-04-19 21:18
2002.05.02
MediaPlayer


1-2621
Surprising
2002-04-20 07:56
2002.05.02
Excel




   Наверх