SOLVED: Dynamically add items to Splitbutton |
Post Reply |
Author | |
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Posted: 21 August 2008 at 5:45am |
Hi,
I'm trying to make a dropdownmenu which can be used also as a toolbar and eventually as popupmenu. Just one function which create menu items for all options. I guess it is possible what I want but I can't get it right. Would someone be so kind and look at the code and tell me what to change.
Thanks in advance
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Try this:
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Oleg,
Thanks, does this mean it isn't possible with my original idea?
When I have more options to add to the dropdown menu, it wouldn't be a bad idea to have a label to let the user know what to expect. But now, with only one option it looks kind of weird...
I prefer just to build one menu item which can be used for several options: Menu, Toolbar and PopupMenu so creating a seperate toolbar just with same buttons isn't an option as well.
If you think of something else, I mean another idea, you're welcome to share them with me
Thanks again Oleg
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Here another solution:
Private Sub CommandBars_InitCommandsPopup(ByVal CommandBar As XtremeCommandBars.ICommandBar)
Dim col As XtremeReportControl.ReportColumn Dim Control As CommandBarControl, ControlItem As CommandBarControl Dim ctrlButton As CommandBarButton If (Not CommandBar.Parent Is Nothing) Then If CommandBar.Parent.Id = 1002 Then CommandBar.Controls.DeleteAll If currentReportVisible.Columns.Count > 0 Then For Each col In currentReportVisible.Columns Set ctrlButton = CommandBar.Controls.Add(xtpControlCheckBox, col.ItemIndex + 1 + 1002, col.Caption) ctrlButton.CloseSubMenuOnClick = False ctrlButton.Checked = col.Visible Next col End If End If End If End Sub replace it in original sample.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Oleg,
That's what I was looking for
Thanks a lot.
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
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 |