Hi,
Could someone kindly tell me how to stop maximizing a dialog box with cursor? Like, when we create a toplevel window, it is possible to maximize that window with mouse, holding its border. I want to fix the size of the window? How?

Thanks in advance
Regards

Recommended Answers

All 3 Replies

Kindly let us know which GUI toolkit you are using.

Also, can you give us a small sample of your code?

Hi,
I am using tkinter. I tagged it.
I hv made an about dialog with a picture in it. when i click the about menu the about dialog box shows. But the problem is it is resizable with mouse. i want to stop it from resizing. Here is the code.

class aboutDialog(Toplevel):

    def __init__(self, parent, **kw):
        Toplevel.__init__(self, parent)
        self.transient(parent)
        self.title("About")

        self.parent = parent
        self.result = None

        body = Frame(self)
        self.initial_focus = self.body(body)
        body.pack(padx=5, pady=5)

        photo1 = tk.PhotoImage(file="me.gif")

        label = tk.Label(self, image=photo1)
        label.pack(padx=5, pady=5)
        label.image = photo1

        self.buttonbox()
        self.grab_set()

Could you kindly tell me, how to stop it from resizing with mouse?
Thank you for reply

Regards

Hi,
thanks, it is solved.

Regards

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.