RibbonBar

RibbonBar

Postby Otto » Wed Sep 09, 2009 3:45 pm

Is it possible to navigate within the Ribbonbar with the keyboard.
Thank in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: RibbonBar

Postby Antonio Linares » Wed Sep 09, 2009 9:42 pm

Otto,

Please add these changes to Class TRibbonBar:
Code: Select all  Expand view

   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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RibbonBar

Postby Otto » 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: RibbonBar

Postby Otto » Mon Sep 14, 2009 12:19 pm

Hello Antonio,
if I insert to get the changeRibbonEvent

Code: Select all  Expand view
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: Select all  Expand view

  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 ),)
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: RibbonBar

Postby Antonio Linares » Mon Sep 14, 2009 1:00 pm

Otto,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RibbonBar

Postby Otto » Mon Sep 14, 2009 1: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: Select all  Expand view
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: Select all  Expand view
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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: RibbonBar

Postby Otto » Mon Sep 14, 2009 4: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: RibbonBar

Postby Antonio Linares » Mon Sep 14, 2009 7:06 pm

Otto,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RibbonBar

Postby Otto » Mon Sep 14, 2009 8: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: RibbonBar

Postby Otto » Tue Sep 22, 2009 6:19 pm

Do the up- and down-keys for navigation work with ribbonbar.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: cmsoft and 54 guests