For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > September 2007 > Restricting size (width) of getOpenFIle() dialog









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Restricting size (width) of getOpenFIle() dialog
Prashant

2007-08-30, 8:03 am

Hi,

I am using getOpenFile() to get a selected file. I set the initial
directory of getOpenFile() dialog to my CWD (current working
directory).
But, if my CWD is very long, eg. C:/aaaaaaaaaaaaaaaaaaaaaaa/
bbbbbbbbbbbbbbbbbbbbbbbbb/cccccccccccccccccccccc/dddddddddddddddd & so
on; the width of dialog get too long and is beyond screen size.

How can i restrict the width of the dialog to some fix value.

thanks,
Prashant

Slaven Rezic

2007-09-16, 7:07 pm

Prashant <prashant.dude@gmail.com> writes:

> Hi,
>
> I am using getOpenFile() to get a selected file. I set the initial
> directory of getOpenFile() dialog to my CWD (current working
> directory).
> But, if my CWD is very long, eg. C:/aaaaaaaaaaaaaaaaaaaaaaa/
> bbbbbbbbbbbbbbbbbbbbbbbbb/cccccccccccccccccccccc/dddddddddddddddd & so
> on; the width of dialog get too long and is beyond screen size.
>
> How can i restrict the width of the dialog to some fix value.
>


If you do not need the actual look of the default file dialog, then
you can try another one, e.g. Tk::FileSelect, Tk::FileDialog,
Tk::PathEntry or Tk::FBox. See the widget demonstration how to change
the default file dialog.

Regards,
Slaven

--
Slaven Rezic - slaven <at> rezic <dot> de

Dump a Tk canvas as an xfig file:
http://search.cpan.org/search?mode=...y=Tk::CanvasFig
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com