wxFilePickerCtrl size problem/question [ wxGTK 2.8.0 ]

Ian Britten britten at caris.com
Thu Mar 15 14:02:14 PDT 2007


Francesco Montorsi wrote:

>> [ BTW - It would be really nice if wx included screenshots of the
>> various widgets in their docs like that! :) - Very nice touch! ]
> 
> right, it would be really nice to have such screenshots, maybe one for
> win, one for GTK+2 and one for Mac.
> But I feel someone would have to contribute it ;)

Is anyone prepared to receive/use them, if I did send any?  ;)
[ Seriously, I could maybe find a few minutes to prepare some, but
   would there be any point to doing so, at this time? ]

>> Currently, when I run the 'widgets' sample (And in my own code), only
>> the first letter or two is shown, with some dots.  For example,
>> "Makefile" becomes "M..."

>> This is very frustating, and is almost useless, since you can't see
>> what the file name actually is.

>> Is there some way that I can make it resize itself to be big enough
>> (I didn't see anything hopeful in the API docs)?
> 
> sure and you do it as you would do for any other wx control:
> 
>     // e.g.: if you want the picker to be at least 300 pixels wide:
>     pMyFilePicker->SetMinSize(300, -1);

I see now that I didn't clearly explain what I was seeing (And what
I'm hoping for!  ;)

I'm not talking about the *total* size of the wxFilePickerCtrl - I
can handle that via the normal sizes, sizers, etc.

The case I'm focusing on is when wxFLP_USE_TEXTCTRL is used, and how
the size of the Button versus the size of the TextCtrl gets
determined. Currently (IMHO), the initial button is too small, and
too much of the remaining size of the Picker is given to the TextCtrl.

[ As I mentioned, I see there is proportional settings to control
   what happens when the wxFilePickerCtrl is resized, but that isn't
   quite what I'm referring to.  I'm talking about initial sizes ]

Ideally (IMHO), when the initial size of the button part of the
FilePicker is set, it would be nice (Crucial?) if it was big
enough to show more than 2 characters of the file name, which is all
it currently shows.  To me, this this seems like an unsatisfactory
default, that no one could be happy with.
The ideal behaviour I can imagine, is where the Button part is
automatically sized to be big enough to show most/all of the file
name, and all the remaining size of the Picker is given to the
TextCtrl.

In the meantime, is there any way for me enlarge the (fixed) size of
the button part of the picker?  Or is the proportional stuff the only
way the button size will change?

Thanks for any info/suggestions!
Ian




More information about the wx-users mailing list