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

Вниз

Изменение ширины столбца TListView   Найти похожие ветки 

 
solo ©   (2002-12-28 20:27) [0]

Здравствуйте уважаемые, подскажите, как отловить событие, когда юзер мышью изменил ширину столбца у компонента TListView.


 
Lizard ©   (2002-12-28 20:50) [1]

Попробуй так:
uses стандартный +CommCtrl

type
TForm1 = class(TForm)
LV1: TListView;
procedure FormCreate(Sender: TObject);
private
OldListViewWP : TWndMethod;
procedure NewListViewWP(var Msg : TMessage);
public
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
OldListViewWP := LV1.WindowProc;
LV1.WindowProc := NewListViewWP;
end;

procedure TForm1.NewListViewWP(var Msg : TMessage);
var
Col : TListColumn;
begin
with PHDNotify(TWMNotify(Msg).NMHdr)^ do
case Msg.Msg of
WM_NOTIFY:
begin
if (Hdr.code = HDN_ENDTRACKW then
begin
//событие отловлино - делаешь что хочешь
end;
end;
WM_DESTROY:
begin
LV1.WindowProc := OldListViewWP;
OldListViewWP(Msg);
if csDestroying in LV1.ComponentState then
begin
OldListViewWP := LV1.WindowProc;
LV1.WindowProc := NewListViewWP;
end;
end;
end;
OldListViewWP(Msg);
end;



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

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

Наверх




Память: 0.46 MB
Время: 0.013 c
1-37090
tboxer
2003-01-03 16:22
2003.01.13
курсор и звук


1-37086
jen_bond
2003-01-03 15:09
2003.01.13
Создание компанентов.


14-37296
pavelsinicinv
2002-12-23 09:40
2003.01.13
Build


1-37070
AlexKniga
2003-01-02 21:07
2003.01.13
Как из IDE Delphi отлаживать DLL?


1-37120
Kventin
2003-01-04 13:42
2003.01.13
Проблема с StringReplace