473,700 Members | 2,350 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[wxpython] exclude files in a wx.FileDialog?

Hello,

Is it possible to exclude certain files in a wx.FileDialog, so that the user
won't see them and can't select them with the mouse in de File open window?

I was thinking of somehow extending the class FileDialog(Dial og)
in the wx module _windows.py to a subclass, but I'm not sure how to do that
(if feasible).
cheers
Jul 18 '05 #1
3 4631
On 18 Jan 2005 13:23:24 GMT, John Field <th**@is.invali d> wrote:
Hello,

Is it possible to exclude certain files in a wx.FileDialog, so that the user
won't see them and can't select them with the mouse in de File open window?

I was thinking of somehow extending the class FileDialog(Dial og)
in the wx module _windows.py to a subclass, but I'm not sure how to do that
(if feasible).
cheers


wx.FileDialog is only a wrapper for the api FileDialog (at least this
applies for windows) and therefore it is not possible to derive from it.

Really exclude, I think, is not possible.

You can put a mask
wx.FileDialog(. ..wildcard = "BMP files (*.bmp)|*.bmp|G IF files
(*.gif)|*.gif")

Otherwise you have to create your own FileDialog.
--
Franz Steinhaeusler
Jul 18 '05 #2
Hello Franz,

Franz Steinhaeusler <fr************ *****@utanet.at > wrote in
news:q4******** *************** *********@4ax.c om:
Is it possible to exclude certain files in a wx.FileDialog, so that the
user won't see them and can't select them with the mouse in de File open
window? I was thinking of somehow extending the class FileDialog(Dial og)
in the wx module _windows.py to a subclass, but I'm not sure how to do
that (if feasible).
wx.FileDialog is only a wrapper for the api FileDialog (at least this
applies for windows) and therefore it is not possible to derive from it. Really exclude, I think, is not possible. You can put a mask
wx.FileDialog(. ..wildcard = "BMP files (*.bmp)|*.bmp|G IF files
(*.gif)|*.gif")
In my experience this one shows only .bmp files, whereas
wildcard = "Image files | *.bmp;*.gif"
shows both extensions. Which i find strange, considering wxpython Help voor
wxFileDialog:

It must be noted that wildcard support in the native Motif file dialog is
quite limited: only one alternative is supported, and it is
displayed without the descriptive test; "BMP files (*.bmp)|*.bmp'' is
displayed as "*.bmp'', and both "BMP files (*.bmp)|*.bmp|G IF files
(*.gif)|*.gif'' and "Image files|*.bmp;*.g if'' are errors.

Unfortunately there is no expected extension for the input, most probably the
input files will have no extension at all, but it really is up to the user.

Otherwise you have to create your own FileDialog.

Yes, ehh, pff

Thanks for responding

cheers

Jul 18 '05 #3
On 19 Jan 2005 14:10:45 GMT, John Field <th**@is.invali d> wrote:

Hello John,
Unfortunatel y there is no expected extension for the input, most probably the
input files will have no extension at all, but it really is up to the user.

Otherwise you have to create your own FileDialog.

Yes, ehh, pff

Thanks for responding


you're welcome.
sorry, that i don't have any other infos for you anymore.

I would ask in the wxpython-user mailing list or
wxwidget Ng.

You can also take a look to DrPython;
There is a File drFileDialog, which is a
full FileDialog based on a wx.ListCtrl.

--
Franz Steinhaeusler
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2276
by: Anand Pillai | last post by:
Hi I am using wxPython version 2.4.0.1. When using wxFileDialog to save files, the filename returned is *always* the extension of the first entry in the wildcard. That is if my wildcard string is as "Bitmap files|*.bmp|JPEG files|*.jpg|GIF files|*.gif", the filename
2
2733
by: Iain King | last post by:
I can't get these to work, and I can't work out what I'm doing wrong. I added the following lines to the GenericDirCtrl.py demo in the wxython demos folder: at the end TestPanel.__init__ I added: self.Bind(wx.EVT_TREE_SEL_CHANGED, self.test, dir1) and also added a test def to the class:
1
2269
by: kath | last post by:
Hello, sorry about the lengthy message. I finding difficult to execute this program. The wx.Notebook i created is coming on the splitted frame(self.p2). How do I that. I am started to learn wxPython, and when I run the code, the code doesnot close gracefully, it throughs me an error. "pythonw.exe has encountered a problem and needs to close. We are sorry for the inconvenience"
0
1432
by: tom | last post by:
I would like to use Epydoc (3.0beta1) to document my wxPython (2.6.10) application. The problem is that I can't seem to instruct Epydoc to not also generate partial documentation of wxPython, which makes too much verbiage for a user to wade through in order see the documentation of my program. For example, if my module consists of only the three lines import wx class BasicPanel(wx.Panel):
1
1335
by: smugcool | last post by:
hi, i am creating a form with a text field and two command buttons in vb 6.0 I want when somebody will click on command1 button a path will be shown in the text field. And for second command button i want when somebody clicks in it, Data will be updated in an access file as we receive excel files on daily basis. for command1 i did following but gettting an error of object required and it gets highlighted on Set fd =...
5
7800
by: SMALLp | last post by:
How can i select folder either with wx.FileDialog or with any other. I managed to fine only how to open files but I need to select folder to get files from all sub folders..... Thanks in advance!
8
3715
by: Janwillem | last post by:
Is there a way to force the wx.FileDialog to show as default the thumbnails vie in stead of list view? thanks, janwillem
6
3713
by: Iain King | last post by:
Hi. I have a modal dialog whcih has a "Browse..." button which pops up a file selector. This all works fine, but the first thing the user has to do when they open the dialog is select a file, so I would like the dialog to automatically call the onBrowse function as soon as the dialog opens. However, I don't know how to do this. dlg.ShowModal() onBrowse() obviously doesn't work, and neither does the reverse. I was hoping
3
2112
by: dp_pearce | last post by:
Hi All, Apologies if this should be seriously obvious. But I am quite new to Python and it is not quite so obvious yet. I have a GUI which will eventually load and display database information. I want the user to be able to browse for a database and then load it. My problem relates to how I set the value of a TextCtrl once the user has selected the database they wish to load.
0
8731
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8648
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9218
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7816
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5904
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4660
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2031
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.