It is nice that you fixed something, but you do not share what you fixed
with us. Why?
????? This is an very stupid idea you get!!
When you start to asking questions about PB here, I answer and recomended you to download my MacSkeleton Example... This Example shows how to call Carbon Lib, calling dylibs, create Floating Windows, how to use and organise an Mac bundle, an example on Mac Popup menu button, Activate Window, How to create Mac application menu... and much, much more ...
But the response i get from you on that, whas that i should only answer you on things that you have asked for.. You prefer to ask once again....
But don't told me that I am not willing to share code!!
Code: Select all
Procedure Popup_Window_Open()
Protected wHeight, wWidth
wHeight = 500
wWidth = 500
If OpenWindow(#Popup_Window, 60,60,wWidth, wHeight, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget |#PB_Window_ScreenCentered, "PopUp Example")
If CreatePopupMenu(#Popup_PopUp_Menu_1) ; here the creating of the pop-up menu begins...
; you can use any of the menu creating commands,
MenuItem(#Popup_MenuItem_001, "Popup Menu Item 1") ; just like in a normal menu...
MenuItem(#Popup_MenuItem_002, "Popup Menu Item 2")
MenuItem(#Popup_MenuItem_003, "Popup Menu Item 3")
MenuItem(#Popup_MenuItem_004, "Popup Menu Item 4")
EndIf
UsePNGImageDecoder()
If LoadImage(#Popup_Actionbutton_image, #ResourceFolder + "images/popupbutton.png") ; change 2nd parameter to the path/filename of your image
If CreateGadgetList(WindowID(#Popup_Window))
ImageGadget(#Popup_Actionbutton_1,20,14,22,28,UseImage(#Popup_Actionbutton_image))
ButtonGadget(#Popup_PushButton_1,wWidth-80,wHeight - 40,60,#OS_Standard_Button_Height,"Ok", #PB_Button_Default)
EndIf
EndIf
EndIf ; OpenWindow
EndProcedure
And then I use the EventGadgetID() to detect the MouseClick...
Code: Select all
Case #Popup_Window
Select Event_WindowEvent
Case #PB_Event_CloseWindow : CloseWindow(#Popup_Window)
Case #PB_Event_ActivateWindow : Set_ActiveWindow(#Popup_Window)
EndSelect
Select Event_GadgetID
Case #Popup_Actionbutton_1 : DisplayPopupMenu(#Popup_PopUp_Menu_1, WindowID(#Popup_Window))
Case #Popup_PushButton_1 : CloseWindow(#Popup_Window)
EndSelect ; Event_GadgetID