I hope you'll consider this

I had a look at some images and they're just windows?Ty1003 wrote:Python. wx.Dialog.
Your aim is to create a custom window that contains some text above some buttons?Ty1003 wrote:EG, look at MessageRequester. Even with the #PB_MessageRequester_YesNo flag, the text is above both buttons, and I have not found a way to make custom Dialogs so that they behave like that.
Code: Select all
; PB 5.72
EnableExplicit
; Windows
#WinMain = 0
; Gadgets
Enumeration
#GadText
#GadBtn1
#GadBtn2
#GadBtn3
EndEnumeration
Procedure ShowDialog (title$, message$)
If OpenWindow(#WinMain, 20,20, 260,150, title$, #PB_Window_MinimizeGadget) = 0
MessageRequester("Fatal error", "Can't create main window.", #PB_MessageRequester_Error)
End
EndIf
TextGadget(#GadText, 50,30, 180,25, message$)
ButtonGadget(#GadBtn1, 20,100, 50,25, "Sure")
ButtonGadget(#GadBtn2, 90,100, 50,25, "Never")
ButtonGadget(#GadBtn3, 160,100, 80,25, "What's that?")
EndProcedure
Define event.i, reply$
ShowDialog("Custom dialog", "Do you want a cup of coffee?")
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_Gadget
Select EventGadget()
Case #GadBtn1
reply$ = "Good choice!"
Case #GadBtn2
reply$ = "Do you prefer tea?"
Case #GadBtn3
reply$ = "That's a black magic fluid."
EndSelect
MessageRequester("Reply from the program", reply$, #PB_MessageRequester_Info)
EndSelect
Until event = #PB_Event_CloseWindow
CloseWindow(#WinMain)