Print Page | Close Window

How to add "Recent documents" to SystemButton Menu

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=13336
Printed Date: 23 April 2024 at 6:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to add "Recent documents" to SystemButton Menu
Posted By: adwild2
Subject: How to add "Recent documents" to SystemButton Menu
Date Posted: 05 February 2009 at 3:14am

When you open the system menu in Microsoft Word you see the recently opened documents right of the other menu options. How can i achieve this with the CodeJock CommandBars Control? An expample would be great, don't mind in what programming language.

I probably have to attach a commandbar of type CXTPRibbonSystemPopupBarPage to the System Button Menu, but haven't found an example how this should be done.
 
MS Word example:
 
Greetings,
Arie
( Xtreme SuitePro (ActiveX) version 12.1.1 )
 


-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP SP3 (32bit)
Language: Progress OpenEdge 10.2A



Replies:
Posted By: San0k
Date Posted: 14 August 2009 at 10:10am
I need solution too!


Posted By: San0k
Date Posted: 14 August 2009 at 11:33am
I have find a solution!

Quote
control = CommandBarsInst.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarListCaption");
SystemMenuInst.CommandBars.Controls.AddControl(control, null);

item = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarListItem");
item.Caption = "first recent item";
SystemMenuInst.CommandBars.Controls.Add(item, null);


BUT!

How I can add buttons to bottom of system menu (like "Exit Word") ???


Posted By: Albert1
Date Posted: 17 August 2009 at 5:14pm
Hello,
im trying to use this:
 

        ' MRU
        Set Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemRecentFileList")
        Control.Caption = "Onlangs geopende documenten"
        Control.BeginGroup = True
        Control.Id = XTP_ID_FILE_MRU
        .AddControl Control
        CommandBars.RecentFileList.Add "file1.txt"
        CommandBars.RecentFileList.Add "file2.txt"
        CommandBars.RecentFileList.Add "file3.txt"
        ' ....
        ' EXIT
        Set Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarButton")
        Control.Caption = "Exit from Word"
        Control.Id = ID_APP_EXIT
        .AddControl Control


-------------
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)



Posted By: San0k
Date Posted: 18 August 2009 at 6:14am
Thanks! It works!


Posted By: JvdH
Date Posted: 11 October 2009 at 4:20am

Hello,

How can I add items to the recent list at runtime?

-------------
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 SP6


Posted By: joeliner
Date Posted: 12 October 2009 at 2:16am
Originally posted by Albert1 Albert1 wrote:

 
        Set Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarListItem")
        Control.Caption = "C:\Filename\try.doc"
        Control.Id = ID
        .AddControl Control
 
NOTE: i have changed class to CXTPRibbonControlSystemPopupBarListItem


-------------
Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6


Posted By: JvdH
Date Posted: 12 October 2009 at 5:11pm
Originally posted by joeliner joeliner wrote:

Originally posted by Albert1 Albert1 wrote:

 
        Set Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarListItem")
        Control.Caption = "C:\Filename\try.doc"
        Control.Id = ID
        .AddControl Control
 
NOTE: i have changed class to CXTPRibbonControlSystemPopupBarListItem
This doesnt really work runtime?

-------------
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 SP6


Posted By: joeliner
Date Posted: 13 October 2009 at 2:03am
CommandBars.RecentFileList.Add works out out of the box. see sample.
http://forum.codejock.com/uploads/20091013_020148_RibbonMDISample.rar - uploads/20091013_020148_RibbonMDISample.rar
 
 
If you want to add simple command button then use CXTPRibbonControlSystemPopupBarListItem
 
regards,
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6


Posted By: Peter59
Date Posted: 13 October 2009 at 5:14am
Hi,

is there a way to get the status of the recent files entries, e.g. Pinned/Unpinned by code?

Thanks, Peter






-------------
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6


Posted By: joeliner
Date Posted: 13 October 2009 at 7:17am
Not possible at the moment.
 
Probably CJ can add Pinned Property to RecentFileList
 
regards,


-------------
Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6



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