Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type
- TForm1 = class(TForm)
- procedure FormCreate(Sender: TObject);
- private
- FLastTick: DWORD;
- end;
- implementation
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- // this line is not necessary; the FLastTick will be initialized to 0
- FLastTick := 0;
- end;
- procedure TForm1.VTFocusChanged(Sender: TBaseVirtualTree;
- Node: PVirtualNode; Column: TColumnIndex);
- var
- CurTick: DWORD;
- begin
- CurTick := GetTickCount;
- if CurTick - FLastTick > 1000 then
- begin
- FLastTick := CurTick;
- Sender.InvalidateNode(Node);
- PostMessage(Handle, UM_VT_CHANGED, Integer(Sender), Integer(Node));
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment