I took a look at the code that you wrote and the GUI. To do what you want, you might try this.
$login_menubutton->bind(<Mouse-1>, \&login_procedure);
my $password_box;
my $password_box_frame;
my $password_box_entry;
my $password_box_exit;
sub login_procedure {
if ( not ( Tk::Exists( $password_box ) ) ) {
$password_box = $login->Toplevel();
$password_box_frame = $password_box->Frame()->pack();
$password_box_entry = $password_box_frame->Entry(-show);
$password_box_exit = $password_box_frame->Button(-text,
+'Ok', -command, \&something_with_password)->pack(-side, 'bottom');
}
The above code should make strict happy. One thing that's a pain with Tk, is that you might actually have to use globals or pay really close attention to the declaration of your variables. If this program is for you, you might just want to use globals.
In any case, hope this helps...
Theodore Charles III
Network Administrator
Los Angeles Senior High
4650 W. Olympic Blvd.
Los Angeles, CA 90019
323-937-3210 ext. 224
email->secon_kun@hotmail.com | [reply] [d/l] |
I just need a clarification. Do you want to know how to display the password box when you select an item from the menu? If so, you just need to use the -command parameter to set a subfunciton to call when the item is selected.
For your reference in the future, please post the code inside a <CODE> block. We would like to keep everything on this site so we only need to answer questions once.
| [reply] |
It would be helpful to us all, if you would please post some code, so that we have an idea of what you are trying to do.
TStanley
--------
"Suppose you were an idiot... And suppose you were a member of Congress... But I repeat myself." -- Mark Twain
| [reply] |