It is currently Mon Feb 27, 2017 12:51 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: MenuItem on Menu-Bar
PostPosted: Thu Feb 09, 2017 12:44 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Jan 22, 2009 3:48 am
Posts: 247
Location: china
ok:
Code:
If OpenWindow(0, 0, 0, 400, 300, "MenuItem on Menu-Bar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MaximizeGadget)
 If CreateMenu(0, WindowID(0))
  MenuItem(1, "1")
 
  MenuTitle("a>")
  MenuItem(2, "2")
  MenuItem(3, "3")
 
  MenuTitle("b>")
  MenuItem(4, "4")
  MenuItem(5, "5")
 ;********
CloseSubMenu()
MenuItem(6, "6");as MenuItem(1, "1")
 ;********
  MenuTitle("c>")
  MenuItem(7, "7")
  MenuItem(8, "8")

 EndIf
 Repeat :a=WaitWindowEvent()
  If a=#PB_Event_Menu:Debug EventMenu():EndIf
 Until a=#PB_Event_CloseWindow
EndIf


_________________
my pb for chinese:
http://ataorj.ys168.com


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuItem on Menu-Bar
PostPosted: Thu Feb 09, 2017 1:04 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 761
So... what are we looking for?


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuItem on Menu-Bar
PostPosted: Thu Feb 09, 2017 3:15 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Jan 22, 2009 3:48 am
Posts: 247
Location: china
thanks,for sharing.

_________________
my pb for chinese:
http://ataorj.ys168.com


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuItem on Menu-Bar
PostPosted: Thu Feb 09, 2017 3:31 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 3:47 am
Posts: 1901
gurj wrote:
Code:
;NO CONTAINER
MenuItem(1, "1")
 
MenuTitle("a>")   ;--> CONTAINER
MenuItem(2, "2")
MenuItem(3, "3")

The MenuTitle() object acts as a container for the MenuItem() objects. Without a menu title, menu items are added to the menu bar.

_________________
Texas Instruments 99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuItem on Menu-Bar
PostPosted: Thu Feb 09, 2017 4:44 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Jan 22, 2009 3:48 am
Posts: 247
Location: china
i hope closing MenuTitle() use EndMenuTitle()
thanks !

_________________
my pb for chinese:
http://ataorj.ys168.com


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye