![]() |
How to add a custom control to a Ribbon group |
Post Reply ![]() |
Author | |
fernando ![]() Groupie ![]() ![]() Joined: 22 May 2006 Status: Offline Points: 25 |
![]() ![]() ![]() ![]() ![]() Posted: 06 November 2008 at 10:26am |
Hi,
I'd like to add a custom control to a RibbonBar group. How ca I do this? I was expecting to fin a Handle property in the CommandBarControlCustom as in the TaskPanelGroupItem, but couldn't find any. Thanks in advance |
|
![]() |
|
fernando ![]() Groupie ![]() ![]() Joined: 22 May 2006 Status: Offline Points: 25 |
![]() ![]() ![]() ![]() ![]() |
Got it, nevermind.
|
|
![]() |
|
fernando ![]() Groupie ![]() ![]() Joined: 22 May 2006 Status: Offline Points: 25 |
![]() ![]() ![]() ![]() ![]() |
Hi,
I have managed to add the custom control using the Handle property, but now I'm having a very odd issue: the custom control appears out of the RibbonBar group until I click on the group. Then it gets docked. How can I have it docked from the beginning??? Here's the code I'm using: -------------------------------------------------------------------------------------------- Dim rGroup As RibbonGroup Dim rItem As XtremeCommandBars.CommandBarControlCustom Set rTab = m_rRibbon.Tab(2) Set rGroup = rTab.Groups.AddGroup("Creating Resumes", 45) Set rItem = rGroup.Add(xtpControlCustom, eResumesComboItem, rcString(eResumesComboItem)) rItem.Handle = m_rView.ResumeCombo.WindowHandle After thsi code runs, the custom control (ResumeCombo) isn't docked and is displayed out of the ribbonbar. How can I fix this? Thanks in advance, Fernando PS I'musing VB6 and version 10.4.2 |
|
![]() |
|
ijwelch ![]() Senior Member ![]() Joined: 20 June 2006 Status: Offline Points: 262 |
![]() ![]() ![]() ![]() ![]() |
I think it'll work if you put the m_rView.ResumeCombo in a PictureBox first, then use rItem.Handle = PictureBox.hWnd
|
|
![]() |
|
TShriver ![]() Groupie ![]() ![]() Joined: 27 July 2008 Location: United States Status: Offline Points: 34 |
![]() ![]() ![]() ![]() ![]() |
I'm having the opposite effect. I've added a xtpControlCustom item the DateTimePicker and it shows up in the RibbonBar until I click it. Then it shows up as a button.
Dim TabAdvanced As RibbonTab
Set TabAdvanced = RibbonBar.InsertTab(7, "&Advanced") TabAdvanced.Id = ID_TAB_ADVANCED Set ViewGroup = TabAdvanced.Groups.AddGroup("&Advanced Controls", ID_GROUP_ADVANCED) ViewGroup.ControlsCentering = True Dim ItemCustom As XtremeCommandBars.CommandBarControlCustom Set ItemCustom = ViewGroup.Add(xtpControlCustom, 777, "Time", False, False) Before Click:
![]() After Click:
![]() Any ideas???
Thanks,
Tim
|
|
![]() |
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 |