Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Below is the code in question:

my $BAK_menu = $menu_bar -> Menubutton ( -text => "BACK +UP", -relief => "rais +ed", -borderwidth => 2, + ) -> pack ('-side' => 'l +eft', '-padx' => 1, ); $BAK_menu -> cascade(-label => "Enter Repos." ); my $menu_move = " "; $BAK_menu -> entryconfigure ("Enter Repos.", -menu => $menu_move + );

The goal is to make the first option a cascading widget. When it cascades, it will open an option to enter a directory where the backup repository is. Below that are a number of widgets. Click on these widgets, and you perform a different operation. I CAN'T GET THE CASCADING WIDGET TO CASCADE! Ideas here???? I really need a complete example to follow. Thanks in advance.

Replies are listed 'Best First'.
Re: Cascading (pTk) widget won't cascade
by kcott (Archbishop) on Aug 09, 2021 at 13:44 UTC
Re: Cascading (pTk) widget won't cascade
by Marshall (Canon) on Aug 08, 2021 at 23:07 UTC
    I wrote some framework code for you in reply to your latest post at Re: GETTING the input from a cascading menu.

    I advise against this GUI design: "When it cascades, it will open an option to enter a directory where the backup repository is".

    I don't think that I currently use any GUI with that paradigm. I am not saying that this can't be done. Heck, probably anything can be done!

    My advice is to to have "Change Repo Name" be a left click "executable target, explicitly invoked by the user" in the cascading menu. A "hover and pop up complex dialog" behavior does not fit with usual, common GUI practice.

    Get your GUI working with usual GUI norms and then ask how to do weird stuff. However, I doubt that your users will expect the kind of behavior that you describe nor will they be disappointed by the lack of it.

Re: Cascading (pTk) widget won't cascade
by Anonymous Monk on Aug 06, 2021 at 03:27 UTC

    I really need a complete example to follow

    demo?

        I bookmarked these pages. Thanks. It gives me ideas...