Page 1 of 1

ComboBox - Selecting an item issues "RightClick"

Posted: Thu Apr 09, 2009 3:54 am
by Michel_k17
What am I doing wrong?

When selecting an item in a ComboBox, the EventID() function returns a 1 (RightClick) rather than a "Change".

Am I missing something? It's not a biggie since I can still do what I need, but it is just unexpected.

Thanks!

Posted: Thu Apr 09, 2009 6:30 am
by ts-soft
the combobox doesn't support EventType!
the message is a API message, not a PB_Constant value!

Posted: Thu Apr 09, 2009 2:55 pm
by Andesdaf
there's no EventID() function in Purebasic. I think you mean EventType().
If this is right, please look at ts-soft's message. :)

Re: ComboBox - Selecting an item issues "RightClick&

Posted: Thu Apr 09, 2009 3:32 pm
by gnozal
Michel_k17 wrote:When selecting an item in a ComboBox, the EventID() function returns a 1 (RightClick) rather than a "Change".
You get PB messages as well as Windows API messages in the event loop.
In this case, you get an API notification [CBN_SELCHANGE].
Combobox notifications and messages : http://msdn.microsoft.com/en-us/library ... S.85).aspx

Furthermore, #CBN_SELCHANGE = 1 = #PB_EventType_RightClick = a lot of other constants.

Posted: Fri Apr 10, 2009 1:33 am
by Michel_k17
You are right. Yes: I meant "EventType()".

And upon reading the help file more closely - The Combobox is not listed as a supported gadget. So, #CBN_SELCHANGE it is!

Thanks to all of you for solving the mystery for me!