Ribbonbar add/refresh |
Post Reply |
Author | ||
JvdH
Groupie Joined: 09 May 2008 Status: Offline Points: 50 |
Post Options
Thanks(0)
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 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
our RibbonBar sample do all these things in runtime.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
JvdH
Groupie Joined: 09 May 2008 Status: Offline Points: 50 |
Post Options
Thanks(0)
|
|
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 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
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 |
||
JvdH
Groupie Joined: 09 May 2008 Status: Offline Points: 50 |
Post Options
Thanks(0)
|
|
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 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
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 |
||
JvdH
Groupie Joined: 09 May 2008 Status: Offline Points: 50 |
Post Options
Thanks(0)
|
|
Aint working :(
Any other suggestions?
|
||
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit) Language: Visual Basic 6.0 SP6 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Attach whole project you tried.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
JvdH
Groupie Joined: 09 May 2008 Status: Offline Points: 50 |
Post Options
Thanks(0)
|
|
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 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
Create new project and insert last code
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
JvdH
Groupie Joined: 09 May 2008 Status: Offline Points: 50 |
Post Options
Thanks(0)
|
|
Thank you
|
||
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit) Language: Visual Basic 6.0 SP6 |
||
JvdH
Groupie Joined: 09 May 2008 Status: Offline Points: 50 |
Post Options
Thanks(0)
|
|
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 |
||
JvdH
Groupie Joined: 09 May 2008 Status: Offline Points: 50 |
Post Options
Thanks(0)
|
|
Nobody with a solution for this?
|
||
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit) Language: Visual Basic 6.0 SP6 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
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 |
||
JvdH
Groupie Joined: 09 May 2008 Status: Offline Points: 50 |
Post Options
Thanks(0)
|
|
Thank you :) working now
|
||
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows 7 (64bit) Language: Visual Basic 6.0 SP6 |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |