Print Page | Close Window

CommandBars 13.2.1

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=15823
Printed Date: 16 November 2024 at 5:43am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CommandBars 13.2.1
Posted By: Alpicus
Subject: CommandBars 13.2.1
Date Posted: 11 December 2009 at 6:17am

Hi,

I'm using Visual Objects 2.8 ( http://www.cavo.com - www.cavo.com ). I've created a MDI window with CommandBars and configure one of the button (controlpopup) as XTP_ID_WINDOWLIST to list the child windows but when I display a child window, it's not displayed in the controlpopup button, there is just a blank square under the button like when there is no item under a popup !?!?

Below the code :
DEFINE XTP_ID_WINDOWLIST := 35000

oSwitch := oGroupDisFolders:Add(xtpControlPopup, 99999, "Switch", FALSE, FALSE)

oSwitch:CommandBar:Controls:Add(xtpControlButton, XTP_ID_WINDOWLIST, "Item 1", FALSE, FALSE)

Do you have any idea ?

Thanks and Best Regards,

Phil




Replies:
Posted By: gibra
Date Posted: 07 February 2010 at 7:23am
You should use a "special control" for Window list.
This is a sample code for Ribbon, but should be work with normal commandbar, also:
 
Dim ControlPopup As CommandBarPopup 
Dim GroupWindow1 As RibbonGroup 
Public Const ID_GROUP_WINDOW = 136
Public Const ID_WINDOW_SWITCH = 143
 
Set GroupWindow1 = TABHome.Groups.AddGroup("Window", ID_GROUP_WINDOW)
Set ControlPopup = GroupWindow1.Add(XtremeCommandBars.XTPControlType.xtpControlPopup, ID_WINDOW_SWITCH, "Switch window", False, False)
ControlPopup.CommandBar.Controls.Add XtremeCommandBars.XTPControlType.xtpControlButton, XtremeCommandBars.XTPCommandBarsSpecialCommands.XTP_ID_WINDOWLIST, "Item 1", False, False

 
HTH


-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8


Posted By: Alpicus
Date Posted: 07 February 2010 at 8:06am
Hi Gibra,
 
It's exactly what I did but no item is displayed in the popup control. What are the conditions for CommandBars to recognize the MDI child windows ? Which style must they own ?
 
Thanks for ur replies,


-------------
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows Vista SP2 (32bit)
Language: Visual Objects 2.8


Posted By: gibra
Date Posted: 09 February 2010 at 7:34am
Are you sure to use the correct code?
 
The Window List control must be this:
XtremeCommandBars.XTPCommandBarsSpecialCommands.XTP_ID_WINDOWLIST
 
I don't know if work if you doesn't specific the XTPCommandBarsSpecialCommands...
 
Show modified code you use now.


-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8


Posted By: Alpicus
Date Posted: 09 February 2010 at 7:49am
Hi Gibra,
 
XTP_ID_WINDOWLIST is a constant representing an Int (in this case 35000) and depending on the language, you have to use the full path like in VB "XtremeCommandBars.XTPCommandBarsSpecialCommands.XTP_ID_WINDOWLIST" or simply the constant itself without the whole path "XTP_ID_WINDOWLIST"
 
As an example I use also "XTP_ID_RIBBONCUSTOMIZE" (Int : 9607) without the full path and it working great.
 
You can find this by following the reference of the constant. Here is the code in C# :

using System;

using System.Runtime.InteropServices;

namespace XtremeCommandBars

{

[Guid("ABDCCDFF-A6AC-46F6-A791-69522EC9F482")]

public enum XTPCommandBarsSpecialCommands

{

XTP_ID_CUSTOMIZE_ADDORREMOVE = 9122,

XTP_ID_CUSTOMIZE_RESET = 9123,

XTP_ID_TOOLBAR_EXPAND = 9148,

XTP_ID_TOOLBAR_HIDE = 9149,

XTP_ID_WORKSPACE_CANCEL = 9159,

XTP_ID_RIBBONCONTROLTAB = 9604,

XTP_ID_RIBBONCUSTOMIZE = 9607,

XTP_ID_WINDOWLIST = 35000,

XTP_ID_CUSTOMIZE = 35001,

XTP_ID_WORKSPACE_ACTIONS = 35002,

XTP_ID_FILE_MRU = 35003,

XTP_ID_TOOLBARLIST = 59392,

}

}

 

I wonder if my problem is more about how the CommandBars recognize a child window so it can list it in the CommandBarPopup. If a member of the development team can confirm this, it will be great...



-------------
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows Vista SP2 (32bit)
Language: Visual Objects 2.8



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