Re: Win32Lib: ListBox's and Focus
- Posted by "Derek Parnell" <ddparnell at bigpond.com> Nov 23, 2003
- 417 views
----- Original Message ----- From: "Elliott Sales de Andrade" <quantum_analyst at hotmail.com> To: <EUforum at topica.com> Subject: Win32Lib: ListBox's and Focus > > > A loss of focus appears to be causing a w32HChange event to be called for > ListBox's. I don't think this is correct. It never happens on such a thing > as a ComboBox. Yep! This is a mistake I've made. The fix is not a one-liner though. Change the definition of 'kMsgCommandCode' to ... constant kMsgCommandCode = { {BUTTON,BN_CLICKED}, -- Button click {STATIC,STN_CLICKED}, -- Label(static) click {COMBO,CBN_EDITCHANGE}, -- combo notify change {LISTBOX,LBN_SELCHANGE}, -- combo/list box notify change {EDIT,EN_CHANGE}, -- editbox notify change {COMBO,CBN_DROPDOWN}, -- The combobox is about to dropdown. {COMBO,CBN_CLOSEUP} -- The combobox dropdown has just been closed } and then in the 'wmCommand' routine, change the line ... w32event = find(event, kMsgCommandCode) to w32event = find({window_family[id],event}, kMsgCommandCode) -- Derek