Board index » delphi » Combobox Measure Event Doesn't get Called?

Combobox Measure Event Doesn't get Called?

I've Set the Combobox1 Style to be  csOwnerDrawVariable and it calls
the Draw part just fine. It's also supposed to call the MeasuerItem
event as well but it never gets there.  What am I doing wrong?

TIA

cbru...@compulife.com_spam

 

Re:Combobox Measure Event Doesn't get Called?


Quote
> I've Set the Combobox1 Style to be  csOwnerDrawVariable and it calls
> the Draw part just fine. It's also supposed to call the MeasuerItem
> event as well but it never gets there.  What am I doing wrong?

  Chris,

  hard to say what you are doing wrong since you did not even tell us the
Delphi version you are using. In D1 i think there was a problem with the
order of events: if you load strings into the combo at design time the
WM_MEASUREITEM messages where send at run-time before the OnMeasureItem
handler was attached. Send CB_SETITEMHEIGHT messages to the control to tell
it the item heights.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitely requested!

Re:Combobox Measure Event Doesn't get Called?


Sorry bout that, I'm using Delphi 3.  I'll Try your suggestion though.

On Sat, 26 Sep 1998 15:32:29 +0200, Peter Below

Quote
<100113.1...@compuserve.com> wrote:
>> I've Set the Combobox1 Style to be  csOwnerDrawVariable and it calls
>> the Draw part just fine. It's also supposed to call the MeasuerItem
>> event as well but it never gets there.  What am I doing wrong?

>  Chris,

>  hard to say what you are doing wrong since you did not even tell us the
>Delphi version you are using. In D1 i think there was a problem with the
>order of events: if you load strings into the combo at design time the
>WM_MEASUREITEM messages where send at run-time before the OnMeasureItem
>handler was attached. Send CB_SETITEMHEIGHT messages to the control to tell
>it the item heights.

>Peter Below (TeamB)  100113.1...@compuserve.com)
>No e-mail responses, please, unless explicitely requested!

Other Threads