> A few things to check:
> 1. You have connected the OnDrawItem event of the second combobox to
> CB_ModeloDrawItem.
HOW TO DO IT ???????
> 2. On the second combobox, you have set the style to csOwnerDrawFixed, or
> csOwnerDrawVariable.
csOwnerDrawVariable !!!
> 3. You have bitmaps in your second combobox.
YES
> The other observation is you ought to use Sender as the combobox, as in:
> var
> cbox: TCombobox;
> begin
> // This method only handles comboboxes
> if not (Sender is TCombobox) then Abort;
> // Cast sender as a combobox
> cbox := TCombobox (Sender);
THIS CAUSES AN UNDECLARED IDENTIFICER; 'SENDER' ERROR
>
> > Other question (sorry my ignorance !!) is How to Wrap lines in
ComboBoxes
> Items ???
>
> The problem is you are using TextOut. This does not wrap lines. None of
> the TCanvas text drawing methods do! You have to use Windows.DrawText.
> This is a WinAPI function, so you will have to call it by passing the
handle
> of the TCanvas as the hDC. Something like:
>
> Inc (Rect.Left, Offset);
> Windows.DrawText (Handle, PChar(cbox.Items[Index]),
> Length(cbox.Items[Index]), Rect, DT_WORDBREAK);
>
YEEEEEEES, PERFECT, WONDERFUL, IT WORKS !!!! THANKS, THANKS !!!!!!
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz