Popup menu

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Popup menu

Post by Otto »

I think if you have only 1 item in a popup menu the width of the popup is wrong.
Could someone please check this.
Thanks in advance

Otto

Code: Select all

// Defining ButtonBar buttons which uses Bitmaps files from disk

#include "FiveWin.ch"

static oWnd

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

function Main()

   local oBar
   local oBrush
   local oPopup

   DEFINE BRUSH oBrush COLOR nRGB( 12, 129, 87 )

   DEFINE WINDOW oWnd FROM 1, 10 TO 20, 60 ;
      TITLE "Testing Buttons from disk" ;
      BRUSH oBrush

   DEFINE BUTTONBAR oBar OF oWnd _3D

 
         MENU oPopup oPopup
   
         MENUITEM "Test" ACTION msginfo( "Test" )    
        
    ENDMENU

 
   DEFINE BUTTON OF oBar FILE "..\bitmaps\16x16\exit.bmp" ;
      ACTION MsgInfo( FWVERSION ) ;
      MESSAGE "You can place..." GROUP;
      MENU oPopup

  

   DEFINE BUTTON OF oBar FILE "..\bitmaps\16x16\Open.bmp"  ;
      ACTION MsgInfo( FWVERSION ) ;
      MESSAGE "Any BMP File here..." 

   DEFINE BUTTON OF oBar FILE "..\bitmaps\16x16\Cut.bmp" ;
      ACTION MsgInfo( FWVERSION ) ;
      MESSAGE "Reading it from disk !!!"

   SET MESSAGE OF oWnd TO FWVERSION + " " + FWCOPYRIGHT

   ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//
 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Popup menu

Post by Otto »

Enrico thank you for your help. I see my mistake now.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
peterk
Posts: 47
Joined: Thu Jul 13, 2006 2:39 pm

Re: Popup menu

Post by peterk »

Hi Otto/Enrico/Others

I have this problem with pop up menus that I have never been able to resolve
When a pop up menu is displayed, no menu item is highlighted, the user has to press 'Down" to move to the first menu item, then press 'Enter' to select it
I wish to be able to specify the default menu item to be highlighted/pre-selected when the pop up menu opens (e.g. the first menu item), so that the user if he wants to selectitem 1 just has to press 'Enter'

Any assistance would be appreciated
Thanks, Peter
Peter
Post Reply