
# https://www.globalsino.com/ICs/page4853.html
# Use popup window to open a webpage


import webbrowser
from tkinter import *  
import tkinter.messagebox
  
MainWindow = tkinter.Tk()
  
MainWindow.title("Travel to East, South, West, and North")
MainWindow.geometry('200x200')

def GlobalSinoWebpage():
   url = webbrowser.open_new("https://www.globalsino.com/")
   
def East():
    tkinter.messagebox.showinfo("Hello", "Go to East")
  
def West():
    tkinter.messagebox.showinfo("Hello", "Go to West")
  
def North():
    tkinter.messagebox.showinfo("Hello", "Go to North")
  
def South():
    tkinter.messagebox.showinfo("Hello", "Go to South")
  
ButtonWest = Button(MainWindow, text="West", pady=10)
ButtonEast = Button(MainWindow, text="East",  pady=10)
ButtonNorth = Button(MainWindow, text="North", pady=10)
ButtonSouth = Button(MainWindow, text="South", command=South, pady=10)

My_Button =Button(MainWindow, text="Details on WWW", font=('Courier',15,'bold'), command=GlobalSinoWebpage)
My_Button.place(x=60, y=60)
My_Button.pack()

ButtonWest.pack(side=LEFT)
ButtonEast.pack(side=RIGHT)
ButtonNorth.pack(side=TOP)
ButtonSouth.pack(side=BOTTOM)

MainWindow.mainloop()
