FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Popup menu
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Popup menu
Posted: Mon Aug 08, 2011 08:05 AM
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 (fw): Select all Collapse
// 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

//----------------------------------------------------------------------------//
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Popup menu
Posted: Mon Aug 08, 2011 08:42 AM
Otto wrote:
Code (fw): Select all Collapse
MENU oPopup oPopup


Code (fw): Select all Collapse
MENU oPopup POPUP


EMG
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Popup menu
Posted: Mon Aug 08, 2011 12:04 PM

Enrico thank you for your help. I see my mistake now.
Best regards,
Otto

Posts: 47
Joined: Thu Jul 13, 2006 02:39 PM
Re: Popup menu
Posted: Tue Aug 09, 2011 03:05 AM

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

Continue the discussion