GetMenuItemText and #pb_any doesnt work

Just starting out? Need help? Post your questions and find answers here.
User avatar
max_aigneraigner@web.de
User
User
Posts: 67
Joined: Sun Nov 02, 2008 10:37 pm
Location: Bavaria
Contact:

GetMenuItemText and #pb_any doesnt work

Post by max_aigneraigner@web.de »

Hello forum,

the command getmenuitemtext does not work with #pb_any for the menuitem ID.
Here a code:

Code: Select all

CompilerIf #PB_Compiler_Debugger = 0
   MessageRequester( "ERROR" , "Enable Debugger!" , #MB_ICONINFORMATION )
   End 
CompilerEndIf 

OpenWindow        ( 0 , 0 , 0 , 200,200,"")
   CreateMenu     ( 0 , WindowID ( 0 ) )
      MenuItem    ( 0 , "hallo " )
      MenuItem    ( #PB_Any , "zusammen" )
      
Repeat 
   evt            = WaitWindowEvent ()
   
   Select         evt 
      Case        #PB_Event_Menu 
         eventmenu  = EventMenu () 
         Select eventmenu 
            
            Case    -1
            Default 
               Debug "ID: " + Str(eventmenu ) 
               Debug " text: " + GetMenuItemText( 0 , eventmenu )
               Debug ""
         EndSelect 
   EndSelect 
Until evt = #PB_Event_CloseWindow  
PB 4.60 windows 7 64

yours Max.
3D Projects
A ship is safest in the harbor, but that is not what ships are built for.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: GetMenuItemText and #pb_any doesnt work

Post by c4s »

No bug: You are not allowed to use #PB_Any for MenuItem(). Take a look into the help file! :P
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Ohnesorg
New User
New User
Posts: 1
Joined: Wed Jun 27, 2012 8:15 am

Re: GetMenuItemText and #pb_any doesnt work

Post by Ohnesorg »

hm.. but it should hm.. :P As I do need it .. Now!. ^^
ok, delete that post (btw. it's still me, but I changed the account.. the old one included my email as Username.. not good)
Post Reply