FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour RibbonBar
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
RibbonBar
Posted: Wed Sep 09, 2009 03:45 PM

Is it possible to navigate within the Ribbonbar with the keyboard.
Thank in advance
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RibbonBar
Posted: Wed Sep 09, 2009 09:42 PM
Otto,

Please add these changes to Class TRibbonBar:
Code (fw): Select all Collapse
   METHOD GoLeft() INLINE If( ::nOption > 1, ::SetOption( ::nOption - 1 ),)
   
   METHOD GoRight() INLINE If( ::nOption < Len( ::aDialogs ), ::SetOption( ::nOption + 1 ),)

   ...

   METHOD KeyDown( nKey, nFlags )

   ...

METHOD KeyDown( nKey, nFlags ) CLASS TRibbonBar

   do case
      case nKey == VK_LEFT
           ::GoLeft()
   
      case nKey == VK_RIGHT
           ::GoRight()
   endcase
   
return Super:KeyDown( nKey, nFlags )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: RibbonBar
Posted: Wed Sep 09, 2009 10:02 PM

Hello Antonio,
to navigate between the groups is working.
How to enter the group and navigate inside the groups?
Thanks in advance
Otto

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: RibbonBar
Posted: Mon Sep 14, 2009 12:19 PM
Hello Antonio,
if I insert to get the changeRibbonEvent

Code (fw): Select all Collapse
oRBar:aDialogs[1]:bGotFocus := {||msginfo(1)}
  oRBar:aDialogs[2]:bGotFocus := {||msginfo(2)}
  oRBar:aDialogs[3]:bGotFocus := {||msginfo(3)}
  oRBar:aDialogs[4]:bGotFocus := {||msginfo(4)}


the keyboard navigation does no longer work.

Thanks in advance
Otto

Code (fw): Select all Collapse
 
  METHOD GoLeft() INLINE If( ::nOption > 1,(msginfo("left") ,::SetOption( ::nOption - 1 )),)


METHOD GoLeft() INLINE If( ::nOption > 1, ::SetOption( ::nOption - 1 ),)
   
   METHOD GoRight() INLINE If( ::nOption < Len( ::aDialogs ), ::SetOption( ::nOption + 1 ),)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RibbonBar
Posted: Mon Sep 14, 2009 01:00 PM

Otto,

Please use LogFile() and don't use MsgInfo(), as MsgInfo() changes the focus sequence

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: RibbonBar
Posted: Mon Sep 14, 2009 01:44 PM
Hello Antonio,

if I use

oRBar:aDialogs[1]:bGotFocus := {||logfile("log.txt", { " 1" } ) }
oRBar:aDialogs[2]:bGotFocus := {||logfile("log.txt", { " 2" } ) }
oRBar:aDialogs[3]:bGotFocus := {||logfile("log.txt", { " 3" } ) }
oRBar:aDialogs[4]:bGotFocus := {||logfile("log.txt", { " 4" } ) }

the new method don’t work.
Code (fw): Select all Collapse
 METHOD GoLeft() INLINE If( ::nOption > 1, (  logfile("log.txt", { " left" } )   ,::SetOption( ::nOption - 1 ))  ,)
   METHOD GoRight() INLINE If( ::nOption < Len( ::aDialogs ), (  logfile("log.txt", { " right" } )   ,::SetOption( ::nOption + 1 )),  )


If I don’t use
Code (fw): Select all Collapse
oRBar:aDialogs[1]:bGotFocus := {||logfile("log.txt", { " 1" } ) }


goleft/goright work but the first time you must click on the Ribbonbar first.

Godown does not work.

Best regards,
Otto
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: RibbonBar
Posted: Mon Sep 14, 2009 04:36 PM

Hello Antonio,

goLeft/goRight is working. I don’t know why it is working now.
But the problem still exits is how to start navigation with the keyboard.
Here it only works if I click first on a Tab of the ribbonbar.
Best regards,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RibbonBar
Posted: Mon Sep 14, 2009 07:06 PM

Otto,

What other controls do you have in your main window besides the RibbonBar ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: RibbonBar
Posted: Mon Sep 14, 2009 08:58 PM

Hello Antonio,

thank you for your help.
I had declared a panel before the RIBBONBAR.
Now I changed and declare it after the Ribbonbar and goLeft/goRight is working.
Best regards,
Otto

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: RibbonBar
Posted: Tue Sep 22, 2009 06:19 PM

Do the up- and down-keys for navigation work with ribbonbar.
Best regards,
Otto

Continue the discussion