FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Create Menu as WordPad - is it possible?
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Create Menu as WordPad - is it possible?
Posted: Wed Apr 14, 2010 07:43 PM
Hi,

I need to create a menu like the one shown by WordPad - Is it possible?

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Create Menu as WordPad - is it possible?
Posted: Fri Apr 16, 2010 06:58 PM

Hi,

Any suggestions?

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Create Menu as WordPad - is it possible?
Posted: Fri Apr 16, 2010 07:01 PM
Vilian, maybe you could use a dialog.
Best regards,
Otto


Code (fw): Select all Collapse
Backstage: Interesting, But…
Office 2010’s one major suite-wide interface change is Backstage View, a reworking of multiple fundamental pieces of functionality that’s debuting in all the Office apps. Flashy name aside, it’s the successor to the old File menu, which was the one menu that survived more or less intact in Office 2007, even though it was renamed the Office Button and hung off a little Office logo rather than the word “File.”

Backstage View is where you go to perform tasks such as opening, saving, and printing files, as well as tweaking an app’s options–most of the things you do in Office that don’t involve document editing. It does away with many of the dialog boxes associated with the old File menu in favor of a full-screen window that replaces your document view. What it provides, mostly, is enough elbow room to show you lots of related functionality at once–for instance, the Print section incorporates a preview, so you always see how your settings will affect output without having to detour into a separate Print Preview mode.
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Create Menu as WordPad - is it possible?
Posted: Fri Apr 16, 2010 08:52 PM

Thanks Otto,

But I'd really like to do a set menu. Just as is done in WordPad. Is it possible?

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Create Menu as WordPad - is it possible?
Posted: Fri Apr 16, 2010 10:19 PM
Vilian, I think backstage must be designed and implemented by Antonio.
This will become a very important part for software with ribbonbar design.
To get only a menu I use:
Code (fw): Select all Collapse
MENU oMenu1 POPUP 2007
 MENUITEM "Ende" ACTION oWnd:End() FILE ".\bmp16x16\ende.bmp";
MESSAGE "Programm beenden"
ENDMENU

   oTBackStage = TRBtn():New( 31, 2, 70, 20, , { || oTBackStage:ShowPopup()},;
      oRBar , ,,,,"Datei", , .T., .T.,,,,,, , oMenu1,,,,,,,,,,,,, aClrMenu1, nRGB( 125, 172, 215 ),;
      nRGB( 65, 106, 189 ) )


I thought as a workaround you could try something like this.



Code (fw): Select all Collapse
oTBtn0 = TRBtn():New( 4, 0, 70, 20, "..\bitmaps\rbnmenu.bmp", { || backstage() }, oRBar,;
                         ,,,,,, .T., .T.,,,,,, "POPUP", oMenu,,,,,,,,,,,,, aClrMenu1, nRGB( 125, 172, 215 ),;
                         nRGB( 65, 106, 189 ) ) 



function backstage()

  DEFINE DIALOG backstageDlg;
    FROM 4, 1 TO 25, 70 STYLE nOR( WS_POPUP)  

 
 ACTIVATE DIALOG backstageDlg ON PAINT ShowPopUp( 1, 1 )   
   

return nil

//----------------------------------------------------------------------------//

function BuildPopup()

   local oMenu

   MENU oMenu POPUP                             // Creating a POPUP
      MENUITEM "Open"
      MENU
         MENUITEM "New" MESSAGE "New whatever..."
         SEPARATOR
         MENUITEM "Get" ;
            MESSAGE "Get whatever..." ;
            ACTION cGetFile( "Clipper DataBase (*.dbf) | *.dbf |" + ;
                             "Paradox DataBase (*.db) | *.db",;
                             "Please Select" )
      ENDMENU
      MENUITEM "Close" 
      MENU
         MENUITEM "New..."  ACTION  backstageDlg:end()
         SEPARATOR
         MENUITEM "Old..."
      ENDMENU
      MENUITEM "Select" MESSAGE "Select whatever..."   FILE "..\bitmaps\16x16\a-z.bmp"
      MENUITEM "All" ACTION MsgInfo( "Todo" ) MESSAGE "Everything"
      SEPARATOR
      MENUITEM "More..." ACTION MsgInfo( "More" ) ;
         MESSAGE "This is just an example"
   ENDMENU

return oMenu

//----------------------------------------------------------------------------//

function ShowPopup( nRow, nCol )

   oMenu := BuildPopup()

   ACTIVATE POPUP oMenu WINDOW backstageDlg AT nRow, nCol

return nil

//----------------------------------------------------------------------------//


Best regards,
Otto
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: Create Menu as WordPad - is it possible?
Posted: Sat Apr 17, 2010 08:56 PM

Otto,
can you make an small sample test..? thanks

FWH .. BC582.. xharbour

Continue the discussion