1. Galina C
  2. PowerBuilder
  3. Monday, 19 December 2022 06:27 AM UTC

Hi. I have window with RibbonBar that is imported from XML file in open event.

The RibbonBar contains an Application Button with menu and two Categories with panels, large/small buttons, etc. User should be able to access the Ribbonbar using both mouse and keyboard.

For keyboard access I can use 'Shortcut' property to trigger events for buttons, menu items, checkboxes. Also, I have to add shortcut description to 'Text' property, so that user knows keyboard combination (PowerTip only works with mouseover). But I have trouble finding the way to allow user to switch between Categories/Application using keyboard to browse for all options available.

How can I use keyboard to switch between Category tab pages in RibbonBar?

Regards,

Galina

Accepted Answer
Peter Pang @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 20 December 2022 02:29 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Galina,

 

RibbonCategoryItem doesn't support keyboard shortcuts yet. We'll note this as an enhancement requirement.

Workaround:

Through an object that has shortcut property, such as small buttons, set visible to false and Shortcut to Ctrl+N. Then trigger the following code in the Clicked event to toggle between categories by pressing Ctrl+N.

RibbonCategoryItem     lrbb_categroyItem
Long         ll_Index, ll_Count, ll_index_next

ll_Count = rbb_1.GetCategoryCount ()
If ll_Count > 0 Then
         rbb_1.GetActiveCategory ( lrbb_categroyItem )
         ll_Index = rbb_1.GetCategoryIndex ( lrbb_categroyItem.itemhandle )
         If ll_Index < ll_Count Then
                   ll_index_next = ll_Index +1
         Else 
                   ll_index_next = 1
         End If
         rbb_1.SetActiveCategoryByIndex ( ll_index_next )
End If

 

 

Wish you all a merry Christmas & happy New Year! 

  

Best Regards,

Peter

Comment
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.