![]() |
Context menu customise problem |
Post Reply ![]() |
Author | |
jads ![]() Groupie ![]() Joined: 26 August 2008 Status: Offline Points: 32 |
![]() ![]() ![]() ![]() ![]() Posted: 26 August 2008 at 3:46am |
Using the RibbonSample vb6 project or the vb.net equivalent, if you add the following code to the form in order to customise and handle the context menu
Private Sub CommandBars_ToolBarContextMenu(ByVal ToolBar As
XtremeCommandBars.ICommandBar, ByVal ContextMenu As XtremeCommandBars.ICommandBar)
ContextMenu.ShowPopup 0#, 100, 100 ContextMenu.Controls.DeleteAll End Sub run the project and click on the quickaccess context menu button, the menu pops up as exepected, choose an option, then a blank menu appears, then the quickaccess context menu button cannot be clicked on again.
Have also noticed a similar problem sometimes occurs with the globe contol if a right click is done on a popupbarlist
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
don't call ShowPopup from ToolBarContextMenu menu handler. Change ContextMenu controls instead - Toolkit will show popup manually.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jads ![]() Groupie ![]() Joined: 26 August 2008 Status: Offline Points: 32 |
![]() ![]() ![]() ![]() ![]() |
Hi,
The reason why I was showing the popup was because the commandbar execute event did not occur when choosing commands added to the context menu,
i.e. in your sample having the following code in the ToolBarContextMenu event and clicking on the commands added didnt cause the execute event to be raised.
Private Sub CommandBars_ToolBarContextMenu(ByVal ToolBar As XtremeCommandBars.ICommandBar, ByVal ContextMenu As XtremeCommandBars.ICommandBar) ContextMenu.Controls.Add xtpControlButton, ID_CHAR_BOLD, "Bold" ContextMenu.Controls.Add xtpControlButton, ID_CHAR_ITALIC, "Italic" End Sub Is there something I am missing?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
What sample did you modify? Works for me....
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jads ![]() Groupie ![]() Joined: 26 August 2008 Status: Offline Points: 32 |
![]() ![]() ![]() ![]() ![]() |
The one installed here:
C:\Program Files\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v12.0.2\Samples\CommandBars\VB\RibbonSample
The only thing it goes into the CommandBars execute event for, from the context menu, is the More Commands option
|
|
![]() |
|
jads ![]() Groupie ![]() Joined: 26 August 2008 Status: Offline Points: 32 |
![]() ![]() ![]() ![]() ![]() |
It seems to operate as if the TPM_RETURNCMD flag is set when the popup menu is shown after the ToolBarContextMenu event is used to customise the context menu
|
|
Product: Xtreme SuitePro (ActiveX) version 13.4.0
Platform: Windows XP (32bit) - SP 3 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
jads ![]() Groupie ![]() Joined: 26 August 2008 Status: Offline Points: 32 |
![]() ![]() ![]() ![]() ![]() |
Seems similar to the topic https://forum.codejock.com/forum_posts.asp?TID=11984, in that the the execute event does not fire for items chosen from the context menu. It says solved there, but the solution doesnt seen to apply to the original problem of items added to the context menu not causing the execute event to fire when chosen.
|
|
Product: Xtreme SuitePro (ActiveX) version 13.4.0
Platform: Windows XP (32bit) - SP 3 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
jads ![]() Groupie ![]() Joined: 26 August 2008 Status: Offline Points: 32 |
![]() ![]() ![]() ![]() ![]() |
Product: Xtreme SuitePro (ActiveX) version 13.4.0
Platform: Windows XP (32bit) - SP 3 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
Thanks for sample, now I see. Its fixed for 12.1 release.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jads ![]() Groupie ![]() Joined: 26 August 2008 Status: Offline Points: 32 |
![]() ![]() ![]() ![]() ![]() |
Thanks for that. The workaround we used was to show the popup ourselves, return the command and execute the selected control. This worked fine on a right click, but froze the quickaccess dropdown button so that it couldnt be used after the first use.
|
|
Product: Xtreme SuitePro (ActiveX) version 13.4.0
Platform: Windows XP (32bit) - SP 3 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
jads ![]() Groupie ![]() Joined: 26 August 2008 Status: Offline Points: 32 |
![]() ![]() ![]() ![]() ![]() |
Having clicked on the context manu button to show the context menu, if you hit the <Esc> key or click somewhere not on the context menu, the context menu closes, but the context menu button cannot be selected again. it remains in the selected state.
If you choose an option from the context menu, the context menu button state correctly becomes unselected.
|
|
Product: Xtreme SuitePro (ActiveX) version 13.4.0
Platform: Windows XP (32bit) - SP 3 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 |