Ver Mensaje Individual
  #5  
Antiguo 13-07-2007
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 22
cHackAll Va por buen camino
Código Delphi [-]
procedure TForm1.ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
 if ListBox1.ItemIndex <> -1 then
  begin
   ListBox1.Hint := ListBox1.Items[ListBox1.ItemIndex];
   Application.ActivateHint(Mouse.CursorPos);
  end;
end;
 
procedure TForm1.ListBox1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
 if Key in [VK_PRIOR..VK_DOWN] then
  begin
   Mouse.CursorPos := ListBox1.ClientToScreen(Point(ListBox1.Width div 2, (ListBox1.ItemIndex * ListBox1.ItemHeight) + (ListBox1.ItemHeight div 2)));
   ListBox1MouseMove(Sender, [], 0, 0);
  end;
end;

No está en el OnKeyDown (pues se vería mejor), porque aún no habría actualizado el ItemIndex... ahora de poder se puede.
Responder Con Cita