Thread Previous • Date Previous • Date Next • Thread Next |
Well, another solution is we keep the default wxFilePickerCtrl behavior, but simply using it without its wxTextCtrl besides. It still says "(None)" for wxWidgets 2.8, which is equivalent to an empty wxTextCtrl. Then, when one chooses a file, its text gets updated. But at least it does not get truncated to "(N...". The attached screenshots show it. The code to produce such a thing would be: === modified file 'common/dialogs/dialog_page_settings_base.cpp' --- common/dialogs/dialog_page_settings_base.cpp 2013-07-19 18:27:22 +0000 +++ common/dialogs/dialog_page_settings_base.cpp 2013-08-08 20:05:23 +0000 @@ -350,7 +350,13 @@ wxBoxSizer* bSizerfileSelection; bSizerfileSelection = new wxBoxSizer( wxHORIZONTAL ); - m_filePicker = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*.kicad_wks"), wxDefaultPosition, wxDefaultSize, wxFLP_OPEN|wxFLP_USE_TEXTCTRL ); + m_filePicker = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a file"), + wxT("*.kicad_wks"), wxDefaultPosition, wxDefaultSize, wxFLP_OPEN ); bSizerfileSelection->Add( m_filePicker, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); When comes the time to clean that, it will be easier to just add back the flag wxFLP_USE_TEXTCTRL than replace a custom widget with its connected events. Carl On Wed, Aug 7, 2013 at 4:56 PM, Carl Poirier <carl.poirier.2@xxxxxxxxx>wrote: > Oh, I forgot to say that wxFLP_SMALL has been introduced in 2.9.3. > > If we want to fix it for 2.8, then I'm afraid we'll have to create our own > file picker. > > Carl > > > On Wed, Aug 7, 2013 at 4:27 PM, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote: > >> On 08/07/2013 02:27 PM, Carl Poirier wrote: >> > Ok I found out that it's "N..." for "None". This is because the >> wxFilePickerCtrl is >> > constructed with the initial file as wxEmptyString. If a file is >> specified, then the name >> > of that file will appear instead on the button - but not in the >> wxTextCtrl besides it. >> > >> > I then upgraded wxWidgets from 2.8 (Ubuntu repository) to 2.9.5, >> recompiled, and got the >> > "Browse" button, as shown in the first screenshot. >> > >> > Now there's another option too. We can use the wxFLP_SMALL flag, which >> will replace the >> > "Browse" by "...". The wxTextCtrl then gets larger, as shown in the >> second screenshot. >> > >> > Personally, I would not do anything about it since the newer wxWidgets >> fixes it, and that >> > "Browse" speaks more than three dots. What are your thoughts? >> >> >> Nobody can know when the distros will start using wx 2.9.x. The only >> certainty is >> disappointment on that note. So wx 2.8 has to work. >> >> I am happy with the ... button, since it is a common paradigm, if it will >> work on 2.8.x >> >> >> Thanks for the excellent research. >> >> Dick >> >> >> >> > >> > Carl >> > >> > On Wed, Aug 7, 2013 at 4:11 AM, Lorenzo Marcantonio < >> l.marcantonio@xxxxxxxxxxxx >> > <mailto:l.marcantonio@xxxxxxxxxxxx>> wrote: >> > >> > On Wed, Aug 07, 2013 at 08:14:42AM +0200, jp charras wrote: >> > > I also see the 'Browse' text ( Ubuntu 10.04, KDE, wxWidgets 2.9.5) >> > > And the widget used in dialog is a wxFilePickerCtrl, which manages >> > > both the wxTextCtrl and the button. >> > >> > I vote for YAWBO (yet another wx build option) or whatever:P it >> seems >> > that wx is the new java (write once, test everywhere), I'm liking it >> > more and more less (requiring C++ was a big minus anyway for me) >> > >> > Who cares, most probably it can simply be fixed in the form >> editor... >> > >> > For the records wx 2.9.4, gtk 2.24.10/3.2.2 (I don't know which >> uses) >> > and no desktop environment, here. >> > >> > -- >> > Lorenzo Marcantonio >> > Logos Srl >> > >> > _______________________________________________ >> > Mailing list: https://launchpad.net/~kicad-developers >> > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx >> > <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx> >> > Unsubscribe : https://launchpad.net/~kicad-developers >> > More help : https://help.launchpad.net/ListHelp >> > >> > >> > >> > >> > _______________________________________________ >> > Mailing list: https://launchpad.net/~kicad-developers >> > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx >> > Unsubscribe : https://launchpad.net/~kicad-developers >> > More help : https://help.launchpad.net/ListHelp >> > >> >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~kicad-developers >> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx >> Unsubscribe : https://launchpad.net/~kicad-developers >> More help : https://help.launchpad.net/ListHelp >> > >
Attachment:
wxFLP_none.png
Description: PNG image
Attachment:
wxFLP_chosen.png
Description: PNG image
Thread Previous • Date Previous • Date Next • Thread Next |