Page 1 of 1

Create Menu as WordPad - is it possible?

Posted: Wed Apr 14, 2010 7:43 pm
by vilian
Hi,

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

Image

Re: Create Menu as WordPad - is it possible?

Posted: Fri Apr 16, 2010 6:58 pm
by vilian
Hi,

Any suggestions?

Re: Create Menu as WordPad - is it possible?

Posted: Fri Apr 16, 2010 7:01 pm
by Otto
Vilian, maybe you could use a dialog.
Best regards,
Otto

Code: Select all

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.
 

Re: Create Menu as WordPad - is it possible?

Posted: Fri Apr 16, 2010 8:52 pm
by vilian
Thanks Otto,

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

Re: Create Menu as WordPad - is it possible?

Posted: Fri Apr 16, 2010 10:19 pm
by Otto
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: Select all

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: Select all

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

Re: Create Menu as WordPad - is it possible?

Posted: Sat Apr 17, 2010 8:56 pm
by MdaSolution
Otto,
can you make an small sample test..? thanks