in reply to How to change a Tk module?

Tk::FBox is used only on Unix systems. On Windows the native dialog is used through the C interface (see pTk/mTk/win/tkWinDialog.c in the Tk distribution). Unfortunately it is not possible to change the behavior without recompiling.

Maybe you can try Win32::FileOp instead? Or just use the Tk::FBox object directly, but this means that the dialog will look "different" than a standard Windows dialog.

Replies are listed 'Best First'.
Re: How to change a Tk module?
by spikey_wan (Scribe) on Mar 17, 2004 at 13:05 UTC
    Thanks for the Win32::FileOp suggestion, it seems to do the trick. I have one last problem, now, and that is with positioning the SaveAsDialog window. It seems to always appear in the top left corner of the screen. I'm wondering if the handle option has anything to do with this? Have I set it correctly, if my main Tk window is called $mw?

    $out = SaveAsDialog (
    -title => "$title - Save your results as:",
    -filters => [
    'CSV files' => '*.csv',
    'All files' => '*.*'],
    -defaultfilter => 1,
    -handle => "$mw",
    );

    Thanks,
    Spike.

      The handle is probably a Win32 HWND. You can get the HWND by calling $mw->id (I'm not 100% sure, consult the Tk::Widget and Tk::Wm documentation).