wx.FileHistory usage

I not sure if this is a bug or not understanding wx.FileHistory. When
I add a new file to a instance of wx.FileHistory, the new file is
inserted at the top as expected the last file in the list is displayed
after the next menu item. Attached is a demo file.

Run the file fileHistory.py
select the File menu and note the order of files [file1-file5]
Click on Open, this will add a new file to the list
select the File menu again and note that file4 is displayed after Exit
menu item.

Is this the expected behavior?
The example in the wxPython demo uses wx.FileHistory as the last item
in a menu.

Thank you
Galen

fileHistory.py (1.73 KB)

Hi,

ยทยทยท

On Mon, Nov 15, 2010 at 6:34 PM, <dropkick23@gmail.com> wrote:

I not sure if this is a bug or not understanding wx.FileHistory. When
I add a new file to a instance of wx.FileHistory, the new file is
inserted at the top as expected the last file in the list is displayed
after the next menu item. Attached is a demo file.

Run the file fileHistory.py
select the File menu and note the order of files [file1-file5]
Click on Open, this will add a new file to the list
select the File menu again and note that file4 is displayed after Exit
menu item.

Is this the expected behavior?
The example in the wxPython demo uses wx.FileHistory as the last item
in a menu.

In the way that your using it yes it is expected. The FileHistory
simply just Appends an item to the menu its managing so it would be
expected that its at the end.

As an alternative you can create a submenu and use that as the file
history menu.

Cody

As an alternative you can create a submenu and use that as the file

history menu.

Sub menu version attached.

-mark

fileHistoryWithSub.py (1.9 KB)