in reply to Re^3: Setting size of Tk chooseDirectory
in thread Setting size of Tk chooseDirectory

I tried your code. On my system, Active State 5.20.2, the -height has no effect whatsoever. However, width and background do as the documentation for version 1.03 says. Perhaps you have a more recent version? I just used what was in the ppm archive for my Perl version.

Update: I looked on CPAN, latest is version 1.11 - that is probably the difference. But at the end of the day, we have something that is "ugly" on Windows. Don't know the OP's O/S, but that could be a consideration.

  • Comment on Re^4: Setting size of Tk chooseDirectory

Replies are listed 'Best First'.
Re^5: Setting size of Tk chooseDirectory
by Anonymous Monk on Aug 11, 2016 at 02:03 UTC

    Um, 1.03 was over ten years ago, its a pure perl module

    You can still $ds->geometry('6666x6666+0+0');

      I tested that with DirSelect version 1.03 and it works. Ok, is there any way to do something similar with chooseDirectory which would look a lot nicer on Windows?

        Yeah, patch https://metacpan.org/source/SREZIC/Tk-804.033/pTk/mTk/win/tkWinDialog.c to make it resizable

        --- pTk\mTk\win\tkWinDialog.c 2016-08-10 20:17:09.500000000 -0700 +++ pTk\mTk\win\tkWinDialog.c 2016-08-10 20:17:07.453125000 -0700 @@ -29,6 +29,9 @@ #include <shlobj.h> /* includes SHBrowseForFolder */ /* These needed for compilation with VC++ 5.2 */ +#ifndef BIF_NEWDIALOGSTYLE +#define BIF_NEWDIALOGSTYLE 0x00000040 +#endif #ifndef BIF_EDITBOX #define BIF_EDITBOX 0x10 #endif @@ -1777,7 +1780,7 @@ * Set flags to add edit box (needs 4.71 Shell DLLs), status text + line, * validate edit box and */ - bInfo.ulFlags = BIF_EDITBOX | BIF_STATUSTEXT | BIF_RETURNFSANCE +STORS + bInfo.ulFlags = BIF_NEWDIALOGSTYLE | BIF_EDITBOX | BIF_STATUSTE +XT | BIF_RETURNFSANCESTORS | BIF_VALIDATE; /*

        Thats the simplest way. Could also set width height with SetWindowPos function (Windows) but that requirs more pTk chops.

        Also since I forgot how to fix this nonsense

        gcc -s -L../zlib -o pngtest pngtest.o libpng.a -lz -lm gcc -s -o example example.o libz.a gcc -s -o minigzip minigzip.o libz.a gcc -s -o example_d example.o libzdll.a example.o:example.c:(.text+0x33): undefined reference to `compress' example.o:example.c:(.text+0x60): undefined reference to `uncompress'

        Since Tk::PNG doesn't need those examples get rid of that junk

        #~ Tk-804.033\PNG\zlib\Makefile #~ Tk-804.033\PNG\zlib\win32\Makefile.gcc #~ all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example minigzip example_d + minigzip_d all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB)

        That should do it, although when I test this I run into memory access violation, and then I give up :)