import tkinter as tk
from tkinter import ttk

def show_menu(event):
    # Post the dropdown menu just below the button
    dropdown_menu.post(event.x_root, event.y_root)

# Create the main window
root = tk.Tk()
root.title("Dropdown Button Example")
root.geometry("300x200")

# Create a button
button = ttk.Button(root, text="Click me")

# Create the dropdown menu
dropdown_menu = tk.Menu(root, tearoff=0)
dropdown_menu.add_command(label="Option 1")
dropdown_menu.add_command(label="Option 2")
dropdown_menu.add_command(label="Option 3")

# Bind the button click event to the show_menu function
button.bind("<Button-1>", show_menu)

# Place the button in the window
button.pack(pady=20)

# Start the Tkinter event loop
root.mainloop()