Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - [SOLVED] Keyboard Tips not working for std menu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] Keyboard Tips not working for std menu

 Post Reply Post Reply
Author
Message
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] Keyboard Tips not working for std menu
    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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.