Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Ribbonbar add/refresh
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbonbar add/refresh

 Post Reply Post Reply
Author
Message
JvdH View Drop Down
Groupie
Groupie


Joined: 09 May 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote JvdH Quote  Post ReplyReply Direct Link To This Post Topic: Ribbonbar add/refresh
    Posted: 25 January 2009 at 4:28pm
Hi,
 
Im working with an MDIparent and MDIchilds and i was wondering if somebody could answer a few problems :).
 
Is it possible to add items to a combobox in the ribbonbar at runtime and add items to the CXTPRibbonControlSystemPopupBarListCaption at runtime?
 
If not is it then possible to refresh/reload the ribbonbar at runtime?
 
Thank you in advance.
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 SP6
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2009 at 2:03am
Hi,
our RibbonBar sample do all these things in runtime.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JvdH View Drop Down
Groupie
Groupie


Joined: 09 May 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote JvdH Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2009 at 12:11pm
Originally posted by oleg oleg wrote:

Hi,
our RibbonBar sample do all these things in runtime.
I see but i cant get it done to add an item to a commandbar when i click a button?
 
Reloading the Ribbonbar is not part of the examples?
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 SP6
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2009 at 3:12pm

Hi,

 
Create new project and copy this code
 
Private Sub CommandBars1_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
    If (Control.Id = 100) Then
        Dim RibbonBar As RibbonBar
        Set RibbonBar = CommandBars1.ActiveMenuBar
        RibbonBar.Tab(0).Groups(0).Add xtpControlButton, 100, "More Controls"
    End If
   
End Sub
Private Sub Form_Load()
Dim RibbonBar As RibbonBar
Set RibbonBar = CommandBars1.AddRibbonBar("Ribbon")
RibbonBar.MinimumVisibleWidth = 0
Dim RibbonTab As RibbonTab
Set RibbonTab = RibbonBar.InsertTab(0, "Tab")
Dim Group As RibbonGroup
Set Group = RibbonTab.Groups.AddGroup("Group", 1)
Group.Add xtpControlButton, 100, "Add Control"
End Sub
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JvdH View Drop Down
Groupie
Groupie


Joined: 09 May 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote JvdH Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2009 at 5:47pm
Originally posted by JvdH JvdH wrote:

Originally posted by oleg oleg wrote:

Hi,
our RibbonBar sample do all these things in runtime.
I see but i cant get it done to add an item to a commandbar when i click a button?
 
Reloading the Ribbonbar is not part of the examples?
Thank you oleg, this is working fine but i made a typo.
Instead of adding an item to a commandbar i ment adding an item to a COMBOBOX that already exists, created by startup.
 
Tried working out with the code you gave to fix this but the only thing im getting done is to create a new combobox with info. Not adding items to a combobox thats already part of the commandbar.
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 SP6
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2009 at 1:22am
Try this
 
Private Sub CommandBars1_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
    If (Control.Id = 100) Then
        Dim RibbonBar As RibbonBar
        Set RibbonBar = CommandBars1.ActiveMenuBar
       
        Dim Combo As CommandBarComboBox
        Set Combo = RibbonBar.FindControl(xtpControlComboBox, 101, True)
        Combo.AddItem "New String"
    End If
   
End Sub
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JvdH View Drop Down
Groupie
Groupie


Joined: 09 May 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote JvdH Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2009 at 11:57am
Originally posted by oleg oleg wrote:

Try this
 
Private Sub CommandBars1_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
    If (Control.Id = 100) Then
        Dim RibbonBar As RibbonBar
        Set RibbonBar = CommandBars1.ActiveMenuBar
       
        Dim Combo As CommandBarComboBox
        Set Combo = RibbonBar.FindControl(xtpControlComboBox, 101, True)
        Combo.AddItem "New String"
    End If
   
End Sub
Aint working :(
 
Any other suggestions?
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 SP6
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2009 at 1:39pm
Attach whole project you tried.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JvdH View Drop Down
Groupie
Groupie


Joined: 09 May 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote JvdH Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2009 at 1:41pm
Originally posted by oleg oleg wrote:

Attach whole project you tried.
 
The project is almost 20 mb.
 
Another example, if you want to add an item to the font combobox of the sample ribbonbar project at runtime, how to?
 
And second, adding an item to the systembutton caption part (right part of the systembutton menu).
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 SP6
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2009 at 1:43am
Hi,
 
Create new project and insert last code
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JvdH View Drop Down
Groupie
Groupie


Joined: 09 May 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote JvdH Quote  Post ReplyReply Direct Link To This Post Posted: 30 January 2009 at 11:38am
Originally posted by oleg oleg wrote:

Hi,
 
Create new project and insert last code
Didnt have time yet to get at the computer. Will post the project monday.
 
Thank you
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 SP6
Back to Top
JvdH View Drop Down
Groupie
Groupie


Joined: 09 May 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote JvdH Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2009 at 3:04pm
uploads/20090202_150257_JvdH.zip
 
Here i am again.
Ive edited the codejock sample.
 
File attached
 
Hope this helps, as you can see in the sample, its possible to get combobox info but i cant add items to it?
 
Hope you can help elog. Thank you
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 SP6
Back to Top
JvdH View Drop Down
Groupie
Groupie


Joined: 09 May 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote JvdH Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2009 at 3:00pm
Nobody with a solution for this?
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 SP6
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2009 at 1:31am
Hi,
 
In this sample you have Combo + Gallery.
 
Comment line
Set Combo.CommandBar = ComboPopup
 
and you will be able use
 
Combo.AddItem "New String"
in handler
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JvdH View Drop Down
Groupie
Groupie


Joined: 09 May 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote JvdH Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2009 at 6:25pm
Originally posted by oleg oleg wrote:

Hi,
 
In this sample you have Combo + Gallery.
 
Comment line
Set Combo.CommandBar = ComboPopup
 
and you will be able use
 
Combo.AddItem "New String"
in handler
Thank you :) working now
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 SP6
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.186 seconds.