Create Menu as WordPad - is it possible?

Post Reply
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Create Menu as WordPad - is it possible?

Post by vilian »

Hi,

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

Image
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Create Menu as WordPad - is it possible?

Post by vilian »

Hi,

Any suggestions?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Create Menu as WordPad - is it possible?

Post 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.
 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Create Menu as WordPad - is it possible?

Post by vilian »

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
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Create Menu as WordPad - is it possible?

Post 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
MdaSolution
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Create Menu as WordPad - is it possible?

Post by MdaSolution »

Otto,
can you make an small sample test..? thanks
FWH .. BC582.. xharbour
Post Reply