Print Page | Close Window

[SOLVED] Keyboard Tips not working for std menu

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=17225
Printed Date: 04 May 2024 at 7:35am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Keyboard Tips not working for std menu
Posted By: Hemesh
Subject: [SOLVED] Keyboard Tips not working for std menu
Date Posted: 09 September 2010 at 7:26am
Hi,

I'm using a ribbon bar to give me the nice Big O system button, but then I'm using standard ButtonPopup's to build the rest of the menu. (This is to keep a "corporate" feel about it).

Does anyone know why the ShowKeyboardTips does not work for these menus?



Cheers


My Example Code
Private Sub MDIForm_Load()
    Dim objRibbon       As RibbonBar
    Dim objPopup        As CommandBarPopup

    CommandBarsGlobalSettings.App = App

'    SkinFramework1.LoadSkin App.Path & "\Styles\" & "Vista.cjstyles", "NORMALBLACK2.INI"
'    SkinFramework1.ApplyOptions = xtpSkinApplyMetrics Or xtpSkinApplyFrame Or xtpSkinApplyColors Or xtpSkinApplyMenus   '#100404 DB added xtpSkinApplyMenus
'    SkinFramework1.ApplyWindow Me.hWnd
'    CommandBarsGlobalSettings.Office2007Images = App.Path & "\Styles\" & "Office2007Black.dll"

    CommandBars1.EnableActions
    CommandBars1.VisualTheme = xtpThemeOffice2007

    With CommandBars1.Options
        .KeyboardCuesShow = xtpKeyboardCuesShowAlways
        .KeyboardCuesUse = xtpKeyboardCuesUseNone
        .ShowKeyboardTips = True
    End With

    ' Create ribbon bar
    Set objRibbon = CommandBars1.AddRibbonBar("RB")
    objRibbon.EnableDocking xtpFlagStretched
    objRibbon.EnableFrameTheme
    
    ' Quick Access
    objRibbon.QuickAccessControls.Add XtremeCommandBars.XTPControlType.xtpControlButton, 11, "Purchase"
    objRibbon.QuickAccessControls.Add XtremeCommandBars.XTPControlType.xtpControlButton, 12, "Parameters"

    ' Big O system button
    Set objPopup = objRibbon.AddSystemButton
    objPopup.CommandBar.Controls.Add xtpControlButton, 1, "AAA"
    objPopup.CommandBar.Controls.Add xtpControlButton, 2, "BBB"
    objPopup.CommandBar.Controls.Add xtpControlButton, 3, "CCC"
    objPopup.CommandBar.Controls.Add xtpControlButton, 4, "DDD"

    ' Hire Menu
    Set objPopup = objRibbon.Controls.Add(xtpControlButtonPopup, 100, "Hire")
    objPopup.CommandBar.Controls.Add xtpControlButton, 101, "New Estimate"
    objPopup.CommandBar.Controls.Add xtpControlButton, 102, "New Hire"
    objPopup.CommandBar.Controls.Add xtpControlButton, 103, "Amend Hire"
    objPopup.CommandBar.Controls.Add xtpControlButton, 104, "Off Hire"

    ' Sale Menu
    Set objPopup = objRibbon.Controls.Add(xtpControlButtonPopup, 200, "Sale")
    objPopup.CommandBar.Controls.Add xtpControlButton, 201, "New Sale"
    objPopup.CommandBar.Controls.Add xtpControlButton, 202, "Amend Sale"

    ' Invoice Menu
    Set objPopup = objRibbon.Controls.Add(xtpControlButtonPopup, 300, "Invoice")
    objPopup.CommandBar.Controls.Add xtpControlButton, 301, "New Invoice"
    objPopup.CommandBar.Controls.Add xtpControlButton, 302, "Amend Invoice"

End Sub


-------------
Product: Xtreme SuitePro (ActiveX) version 18.5.0

Platform: Windows 7 Enterprise (64-bit)

Language: Visual Basic 6.0



Replies:
Posted By: jpbro
Date Posted: 09 September 2010 at 10:49am
I think you need to put an & character before the letter that you want to be the accelerator key when you are adding your controls.

For example:


Set objPopup = objRibbon.Controls.Add(xtpControlButtonPopup, 300, "&Invoice")


Will show as a keyboard tip for the Invoice control.



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

Language: Visual Basic 6.0 SP6



Posted By: Hemesh
Date Posted: 10 September 2010 at 4:27am
Hi jpbro,

That doesn't work.
Ideally I want CodeJock to work out what tips to show (See screen shots).



(Generated by using "CommandBars1.ActiveMenuBar.Controls.Add" with the CommandBars1.Options.ShowKeyboardTips on.)

This is a really great bit of functionality! I don't need to maintain & in my menus, I don't need to worry about the translations for different languages and where to put the &.

I want the quick access toolbar and the Big O system button but then just simple drop down menus as this has a very nice corporate feel about it. But I also want the "ShowKeyboardTips"   

Any ideas?

-------------
Product: Xtreme SuitePro (ActiveX) version 18.5.0

Platform: Windows 7 Enterprise (64-bit)

Language: Visual Basic 6.0


Posted By: jpbro
Date Posted: 10 September 2010 at 10:33am
Okay, I think I understand what you mean now. The Keyboard tips don't show for menu items when the SystemButton has been added to a Ribbon. Interestingly, the keyboard tips show for child controls of the menu items (for me at least). I suspect you will need to open a support ticket to discuss this with CJ.



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

Language: Visual Basic 6.0 SP6



Posted By: Hemesh
Date Posted: 21 September 2010 at 3:59am
Hi jpbro,

Thanks for your help.

CJ have added this for the next release.


-------------
Product: Xtreme SuitePro (ActiveX) version 18.5.0

Platform: Windows 7 Enterprise (64-bit)

Language: Visual Basic 6.0


Posted By: Hemesh
Date Posted: 22 September 2010 at 10:47am
Quick update.  I've given 13.4.1 a quick test and the ShowKeyboardTips functionality has been added.

-------------
Product: Xtreme SuitePro (ActiveX) version 18.5.0

Platform: Windows 7 Enterprise (64-bit)

Language: Visual Basic 6.0



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