Print Page | Close Window

Add combo box to commandbar

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=2696
Printed Date: 05 October 2024 at 10:21pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Add combo box to commandbar
Posted By: winanjaya
Subject: Add combo box to commandbar
Date Posted: 07 August 2005 at 11:21pm

Dear All,

I am very new with this, is it possible to add a combobox into commandbars? ..pls advise ..

Regards

Winanjaya




Replies:
Posted By: Oleg
Date Posted: 08 August 2005 at 4:05am

See GUISample:

 

 Set Control = .Add(xtpControlButton, ID_DEBUG_START, "Start")
        Control.BeginGroup = True
        Set Combo = .Add(xtpControlComboBox, ID_DEBUG_CONFIGURATION, "Configuration")
        Combo.AddItem "Debug"
        Combo.AddItem "Release"
        Combo.AddItem "Configuration Manager"
        Combo.DropDownWidth = 150
        Debug.Print Combo.List(2)
        Debug.Print Combo.ListCount
        Combo.ListIndex = 2



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: winanjaya
Date Posted: 08 August 2005 at 4:25am

Thanks for your reply, but I am very new with this, could you please inform me what is the value of ID_DEBUG_START and ID_DEBUG_CONFIGURATION and where can I find GUI sample? .. please advise

 

Thanks a lot in advance

Regards

Winanjaya



Posted By: SuperMario
Date Posted: 08 August 2005 at 8:20am
Hi,
It is just a numeric constant defined.  It is used as an ID for the control in the toolbar.  You can use this id to find it within the toolbar.    Look in the Definitions.bas module to see them.  They can be just about any non-negative number.

To find sample, look in the "common" folder under sample in the start menu.


Posted By: winanjaya
Date Posted: 08 August 2005 at 7:46pm

Hi All,

I met "Type mismatch" on this line:

Set Combo = .Add(xtpControlComboBox, ID_COMBO, "Application List")

please advise

Thanks

====

    With ToolBar.Controls
   
        Set Control = .Add(xtpControlButton, ID_COMBO, "Application List")
        Control.BeginGroup = True
       
        Set Combo = .Add(xtpControlComboBox, ID_COMBO, "Application List")
       
        Combo.AddItem "Debug"
        Combo.AddItem "Release"
        Combo.AddItem "Configuration Manager"
   end with



Posted By: winanjaya
Date Posted: 08 August 2005 at 7:52pm

sorry , please ignore my previous message, it works ..

 

Thanks & Regards

Winanjaya




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