Hi Marco,
The first problem is that I have some notebook stored in a dictionary
called notebookList.
I want to show a page in a notebook by a click-event on a menuitem.
That is when I click in the menuItem I would like that the relative
page of relative notebook show us.Something like this:
notebookList[thatSection].ShowPage(1) #I don't know how to get the
numberOfPage and get them each one by one.
Uhm, I don't see the problem here: do you already know which page you
want to show or is it menu-dependent? In the first case, you can just
do something like:
notebookList[thatSection].SetSelection(yourPage)
Otherwise, you should link the menu ID (or the menu label) to the page
you want to show, i.e.:
def OnMenu(self, event):
if event.GetId() == ID_SHOW_PAGE_1:
notebookList[thatSection].SetSelection(1)
Or something along these lines (maybe a more clever approach).
The second question is about calling the function in Bind()
wx.EVT_MENU(MainView, menuItem.GetId(), self.onClick)
def onClick (self, event):
passThe question is: is it possibile to pass some widget parameters at onClick() ?
Well, you could either store a reference to your parameter like:
self.myParameter = whatever
And then use it in the event handler, or you could use this solution
posted by Robin:
HTH.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/
···
On 4/18/07, Sbaush wrote: