Print Page | Close Window

CommandBarComboBox fill items dynamically

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=10838
Printed Date: 17 May 2024 at 10:10pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CommandBarComboBox fill items dynamically
Posted By: Aaron
Subject: CommandBarComboBox fill items dynamically
Date Posted: 30 May 2008 at 8:33am
Hi,
 
I want to add items to a CommandBarComboBox dynamically and I wonder if it is the right choise, to do it in the  Commandbars_Control_Notify event? The reason I'm asking this because sometimes even the IDE crashes.
There's no documentation about this (see another post  http://forum.codejock.com/forum_posts.asp?TID=10436 - http://forum.codejock.com/forum_posts.asp?TID=10436   which didn't get a single reply (again!!)
 
Thanks in advance


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



Replies:
Posted By: Smucker
Date Posted: 30 May 2008 at 9:57am
Using the standard Windows API constrols (not COM/VB), you can clear and fill the combo when you receive the CBN_DROPDOWN (7) notification.

Notifications for standard controls are in the Windows.h file for C/C++; i.e.,

#define CBN_ERRSPACE        (-1)
#define CBN_SELCHANGE       1
#define CBN_DBLCLK          2
#define CBN_SETFOCUS        3
#define CBN_KILLFOCUS       4
#define CBN_EDITCHANGE      5
#define CBN_EDITUPDATE      6
#define CBN_DROPDOWN        7
#define CBN_CLOSEUP         8
#define CBN_SELENDOK        9
#define CBN_SELENDCANCEL    10

I would think there would be a similar defines/enumeration for VB.



Posted By: Aaron
Date Posted: 30 May 2008 at 10:24am
Hi,
 
Thanks for your reply, it's a start and if you are right (I really hope so) I could check it myself.
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net