in reply to Re: Binding double click in a Perl/Tk form
in thread Binding double click in a Perl/Tk form

Its a Tlist...

$tk{output_list} = $tk{right_frame}->Scrolled('TList', -height=>'1', -width=>'1', -scrollbars=>'osoe',);

Many thanks for your contributions...Its is your Drag and Drop example that I have originally used, sparked and started everything off (well this project at least). My whole project is based on this example.

By the way: how can I get a further sub window to take control of the main Tk window “what I call a form” (like a dialog window but also requires user input) and the controls should remains with this sub windows until the user has responded with an input, (I can create the sub window, but I don't know exactly how to keep the control focused on it ).


Many thanks

Blackadder
  • Comment on Re: Re: Binding double click in a Perl/Tk form

Replies are listed 'Best First'.
Re: Re: Re: Binding double click in a Perl/Tk form
by hiseldl (Priest) on Aug 20, 2002 at 13:40 UTC
      By the way: how can I get a further sub window to take control of the main Tk window “what I call a form” (like a dialog window but also requires user input) and the controls should remains with this sub windows until the user has responded with an input, (I can create the sub window, but I don't know exactly how to keep the control focused on it ).

    Do you mean a modal dialog? e.g. a dialog that keeps focus until the 'OK' or 'Cancel' buttons (or whatever buttons) are pressed and doesn't let the user input anything on the main window.

    Also, try binding the double click event directly to the Icon, Label or whatever instead of to the TList, this should work equally as well. Just substitute $tk_form{output_list} with your Label widget, i.e. $tk_form{label}->bind(...). Then let me know if this doesn't work so we can work it out the hard way by figuring out which element of the TList was clicked, etc.

    --
    hiseldl