Print Page | Close Window

[SOLVED] ContextMenu CommandbarEdit

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=17756
Printed Date: 27 November 2024 at 4:30am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] ContextMenu CommandbarEdit
Posted By: Aaron
Subject: [SOLVED] ContextMenu CommandbarEdit
Date Posted: 06 January 2011 at 12:09pm
Hi,
 
Can anyone tell me which event is fired when ContextMenu pops up (rightclicking Editwindow) I need to display my own ContextMenu
 
Or is it possible to change captions and add items?
 
Thanks in advance
 
edit: It is possible to use own captions and/or icons but you cannot add items and Statusbar isn't updated. See explanations below. 


-------------
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....



Replies:
Posted By: Oleg
Date Posted: 06 January 2011 at 4:26pm
Hi,

Afraid this menu doesn't generate CommandBars_InitCommandsPopup event :( Sorry i don't see way how to chnage its items.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Aaron
Date Posted: 07 January 2011 at 1:49am

Hi Oleg,

Thanks for update. So I get stuck with english captions? I really would like to use my own ContextMenu because I can change the captions in any language I want to...

Is there a way to suppress default ContextMenu? Rather have no ContextMenu than one in another language.
 
If you can think of another way to get this working I would be very pleased Wink
 
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....


Posted By: Oleg
Date Posted: 07 January 2011 at 2:41am
Hi,

If you need only change captions, its possible:

    CommandBars.Actions.Add 57635, "New Cut", "New Cut", "", ""
    CommandBars.Actions.Add 57634, "New Copy", "New Copy", "", ""
    CommandBars.Actions.Add 57637, "New Paste", "New Paste", "", ""



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Aaron
Date Posted: 07 January 2011 at 4:15am
Hi,
 
Thanks Oleg, at least I have captions in same language. I also managed to add icons same as my ContextMenu. Too bad it doesn't have same look as my own ContextMenu but I can live with this solution (for now)
 
For someone who is interested:
 
With CommandBars 
      With .Actions
            With .Add(57635, GetString(57635, 1), GetString(57635, 2), GetString(57635, 3), "")
                .IconId = 57635
            End With
            With .Add(57634, GetString(57634, 1), GetString(57634, 2), GetString(57634, 3), "")
                .IconId = 57634
            End With
            With .Add(57637, GetString(57637, 1), GetString(57637, 2), GetString(57637, 3), "")
                .IconId = 57637
            End With
      End With
End With       
 
 
Note: GetString is function to get caption from StringTable, but you can use own captions. Bold items are ID's of the buttons
 
Output:
 
 
Question: I assigned value to .DescriptionText but it doesn't show in StatusBar. Do I need to do something extra or should it show in StatusBar?
 
Question: I noticed there is an ID missing (57636) is this for future options? "Undo", "Select all" and "Delete" maybe.... Big smile
 
 
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....


Posted By: jpbro
Date Posted: 07 January 2011 at 7:41am
Yeah, I don't get it. This looks like a CJ built command bar that appears, so don't you guys have control over whether it appears or not?

It's fine to say it can't currently be done, but it must be possible if features were added, no?

It would be nice if the CommandBarEdit control had a UseContextMenu boolean property that would override the built-in menu, and if the XTPControlNotify Enumeration had an XTP_EN_REQUESTCONTEXTMENU flag to let us know when we could popup our own commandbar (for example, on right-click or when user presses the context menu key).

This would give us complete control over the items and appearance of the edit context menu.


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 07 January 2011 at 7:54am
Originally posted by jpbro jpbro wrote:

Yeah, I don't get it. This looks like a CJ built command bar that appears, so don't you guys have control over whether it appears or not?

It's fine to say it can't currently be done, but it must be possible if features were added, no?

It would be nice if the CommandBarEdit control had a UseContextMenu boolean property that would override the built-in menu, and if the XTPControlNotify Enumeration had an XTP_EN_REQUESTCONTEXTMENU flag to let us know when we could popup our own commandbar (for example, on right-click or when user presses the context menu key).

This would give us complete control over the items and appearance of the edit context menu.
 
Hi Jason,
 
Yes, that would be best way. Using your own ContextMenu would be a nice option to have. This class could be used for CodeJock: PropertyGridControl, ReportControl, well for every control that has an edit portion.
 
Well, for now I don't want to ask too much because I really would like to see some fixes first Wink
 
Thanks
 


-------------
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....


Posted By: jpbro
Date Posted: 07 January 2011 at 7:59am
I agree that it is not a critical feature (especially at this point), I was just a bit confused by the response that there wasn't any way to change the menu - there's a way it just requires work that can't be justified right now (and again - I agree that there is more important stuff to be done).

-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Oleg
Date Posted: 10 January 2011 at 8:52am
Originally posted by Aaron Aaron wrote:

Hi,

Question: I assigned value to .DescriptionText but it doesn't show in StatusBar. Do I need to do something extra or should it show in StatusBar?
 
Question: I noticed there is an ID missing (57636) is this for future options? "Undo", "Select all" and "Delete" maybe.... Big smile
 
 
Thanks a lot
 
  

This is special Popup marked as TPM_NONOTIFY so it doesn't send any notifications/don't update statusbar.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Aaron
Date Posted: 10 January 2011 at 9:14am

Hi Oleg,

Thanks for update. Would be nice though if we could have own ContextMenu or default menu and allow us to customize. Maybe in future release... someday... Wink

Thanks for solution.
 
 


-------------
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....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net