in reply to Toplevel window/widget

Show us a minimal script that demonstrates the problem so we can reproduce it.

True laziness is hard work

Replies are listed 'Best First'.
Re^2: Toplevel window/widget
by conversecorollary (Novice) on Jun 28, 2011 at 10:50 UTC

    That is part of the problem... I tried a simplified example and I could not reproduce the problem. I know the issue is somewhere in my code. I know this is not the place for debugging many lines of code. So I thought it would be best to work this from the angle of what may cause this type of behavior? What would prevent a toplevel widget from minimizing? If I knew some causes, then I could look for those causes.

    Thanks again.

    gary

      Use the undo button in your editor to go back to just before the simplification step that made the problem go away then examine the code you were about to remove. The trick is to remove code that is unrelated to the problem until you have distilled the code down to a small sample that demonstrates the issue. Be warned, using this technique you may end up finding the solution yourself.

      True laziness is hard work

        Would you happen to know the callback for the minimize button and/or system menu? And.or modify?

        Would you know how to modify the system menu minimize option?

        I can tell you now that I have had more time to experiment... that creating a toplevel from the MainWindow menu bar does minimization correctly. But when I try to create another toplevel from further down in the code, the newer toplevel will not minimize. And then the prior toplevel that did function properly now does not! So, I am affecting something global to toplevel widgets. The toplevels are all created via $mw->new_toplevel, where $mw is the MainWindow. And when the toplevels do not minimize the MainWindow still does.

        Thank you for the ideas and thoughts, not to mention your time.

        gary

      What would prevent a toplevel widget from minimizing?

      Code

       

       

       

       

       

      For example, clicking a button triggers a callback (function).

      Clicking minimize button, triggers a callback

      The regular callback, changes the size of the window, it actually minimizes the toplevel window

      Maybe you override this callback, with your own callback, which does not perform minimization