Bom dia a todos Caso alguem estiver interessado, consegui resolver o meu problema . Isto funciona, mas nao e muito elegante:
procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); begin with Listbox1.Canvas do begin Brush.Color:= clWhite; FillRect(Rect); Font.Color:= clBlack; TextOut(Rect.Left+1,Rect.Top+1,ListBox1.Items[Index]); end; end; procedure TForm1.ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var p: TPoint; i,j: integer; begin p.x:= X; p.y:= Y; i:= ListBox1.ItemAtPos(p,False); if (i > -1) then begin for j:= 0 to Listbox1.Items.count-1 do begin if j <> i then with Listbox1.Canvas do begin Brush.Color := clWhite; FillRect(Listbox1.ItemRect(j)); Font.Color:= clBlack; end else with Listbox1.Canvas do begin Brush.Color := clActiveCaption; FillRect(Listbox1.ItemRect(j)); Font.Color:= clWhite; end; Listbox1.Canvas.TextOut(Listbox1.ItemRect(j).Left + 1,Listbox1.ItemRect(j).Top+1,ListBox1.Items[j]); end; end; end; Deve existir uma melhor maneira de realizar a mesma coisa, nao eh? Nao sei muito sobre o Windows SDK - eh uma de minhas grandes faltas muitas felicidades Steve -----Original Message----- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Wilson, Stephen Sent: 10 July 2009 11:27 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] (unknown) Alguem pode me ajudar com este problema, por favor? Quero destacar os itens em uma TListbox quando o mouse passa sob ele, como na lista suspensa de um TCombobox. Como posso conseguir isso eu mesmo, ou alguem sabe de um componente de terceiros que poderia usar? Uso Delphi 5 Obrigado por qualquer ajuda Steve *************************************************************************** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***************************************************************************