FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH RIBBON DESIGNER
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
FWH RIBBON DESIGNER
Posted: Wed Jul 21, 2010 07:51 AM

I need to open a popup on each folder of the RibbonBar , but I not Know wich id the folder and if there are many folders on this ribbonBar
to found with folder is clicked I use the method nOverPrompt() : thi function return the Value 0 if the mouse is not on a folder of the ribbon , or return the number of the folder
and I made this :

DEFINE RIBBONBAR oRBar OF oWnd PROMPTS "One"

For n= 1 to len(oRbar:aprompts) // Read how many folder there are on ribbon

oRbar:adialogs[n]:bRButtonUp = { | nRow, nCol, nFlags |if(oRBar:nOverPrompt( nRow, nCol )==n,MenuTab(nRow,nCol),)) } // MenuTab is a simply popmenu function

next

but if I click on each folder it not open any popup

WHY NOT RUN OK

FWH .. BC582.. xharbour
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Open a Popup on a specific ribbon folder
Posted: Wed Jul 21, 2010 07:54 PM
Silvio

Try this way
Code (fw): Select all Collapse
#include "fivewin.ch"
#include "ribbon.ch"


function main()
   local oWnd
   local oRBar
   local n
   

   DEFINE WINDOW oWnd

   DEFINE RIBBONBAR oRBar OF oWnd PROMPTS "One", "Two", "Three"

   oRbar:bRButtonUp = { | nRow, nCol, nFlags | if( ( n := oRBar:nOverPrompt( nRow, nCol ) ) != 0, MsgInfo( oRBar:aPrompts[ n ] ), ) } 
   
   ACTIVATE WINDOW  oWnd
   
return nil
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: Open a Popup on a specific ribbon folder
Posted: Wed Jul 21, 2010 09:32 PM

thanks,

FWH .. BC582.. xharbour

Continue the discussion