ComboBox - Selecting an item issues "RightClick"

Just starting out? Need help? Post your questions and find answers here.
Michel_k17
User
User
Posts: 14
Joined: Sun Dec 14, 2003 4:57 am
Location: Wichita, Kansas
Contact:

ComboBox - Selecting an item issues "RightClick"

Post 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!
Michel "K-17" Korwin-Szymanowski
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

the combobox doesn't support EventType!
the message is a API message, not a PB_Constant value!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Andesdaf
User
User
Posts: 83
Joined: Sun Mar 22, 2009 2:53 pm
Location: GER, Saxony

Post 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. :)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: ComboBox - Selecting an item issues "RightClick&

Post 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.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Michel_k17
User
User
Posts: 14
Joined: Sun Dec 14, 2003 4:57 am
Location: Wichita, Kansas
Contact:

Post 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!
Michel "K-17" Korwin-Szymanowski
Post Reply