Вниз
Скачать: 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 вся ветка

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



Память: 0.45 MB
Время: 0.012 c
14-37314
Ketmar
2002-12-19 19:01
2003.01.13
---|Ветка была без названия|---


7-37417
Карелин Артем
2002-10-31 11:21
2003.01.13
Проверка орфографии из Word a


1-37015
dim-
2002-12-31 13:48
2003.01.13
Как работать с OLE Compound Storage


1-37007
Delphi Maniak
2003-01-01 10:13
2003.01.13
Вопрос про реестр


14-37383
stas_a
2002-12-25 14:32
2003.01.13
StringGrid с компонентами внутри ячеек




   Наверх