[wxPython-users] FlatNotebok questions
Oswaldo Hernández
listas at soft-com.es
Tue Jun 26 13:15:23 PDT 2007
Oswaldo Hernández escribió:
> Andrea Gavana escribió:
>> Hi Oswaldo,
>>
>> On 6/26/07, Oswaldo Hernandez wrote:
>>> Andrea Gavana escribio:
>>> > Hi Robin and Oswaldo,
>>> >
>>> > On 6/25/07, Robin Dunn wrote:
>>> >> Oswaldo Hernandez wrote:
>>> >> > Hello all,
>>> >> >
>>> >> > I'm trying to use FlatNotebook first time and i have some
>>> questions:
>>> >> >
>>> >> > Sizers:
>>> >> >
>>> >> > When put a FlatNotebook on a sizer an do
>>> >> > sizer.SetSizeHints(flatnotebook) the size is calculated for the
>>> active
>>> >> > tab contents, if there is another tab with a bigger content is
>>> ignored.
>>> >> > May I calculate the size of all tabs content and tell the sizer the
>>> >> > biggest size?
>>> >>
>>> >> Probably the best thing to do for this is to change FlatNotebook to
>>> >> derive from wx.PyPanel and override DoGetBestSize. That method
>>> should
>>> >> find the biggest best size of the pages and add space for the tabs
>>> and
>>> >> return the result.
>>> >
>>> > I have implemented a patch for FlatNotebook and its demo: it seems to
>>> > work, but I would appreciate if someone will double-check what I have
>>> > done:
>>> >
>>> > 1) The Enable method is now called EnableTab;
>>> > 2) FlatNotebook now derives from wx.PyPanel, and I have implemented
>>> > the DoGetBestSize method (hopefully correctly).
>>> >
>>> > Please let me know if you see something strange...
>>> >
>>>
>>> Andrea, Robin, you are fantastic :)
>>
>> Thanks :-D, but I believe all the gratitude should go to Robin,
>> wxPython would be vaporware without him. I am just a little endian
>> working to somewhat enhancing this unequalled GUI package...
>>
>>> I apply the patch and now SetSizeHints() calculate the size of the
>>> bigger tab, and Enable now
>>> enable/disable the whole notebook.
>>>
>>> Another question that i forgot in the previous message:
>>>
>>> If you have the focus outside of notebook and press TAB key for
>>> navigation, the focues never enter
>>> into the notebook.
>>>
>>> I attach a sample program for test size, enable and the navigation .
>>
>> Uhm, I am at work right now and I can't test the latest modifications
>> I made yesterday evening... can you try to include the
>> style=wx.TAB_TRAVERSAL in FlatNotebook to see if it works? You might
>> probably do it for both FlatNotebook and PageContainer, but I am not
>> sure. I will investigate this evening :-D
>>
>
> Andrea,
> I have tryed wx.TAB_TRAVERSAL on flatnotebook and on the parent Panel
> whith same result.
>
>
Andrea, i would like help you,
I'm looking flatnotebook.py and, in the following code (line 3474):
def OnNavigationKey(self, event):
...
...
else:
# pass to the parent
if self.GetParent():
event.SetCurrentFocus(self)
self.GetParent().ProcessEvent(event)
if change to:
else:
# pass to the parent
event.Skip()
The navigation with keyboard works, except the first press that the focus dissapear (i suposse that
the focus is in the tab label)
I don't know if the change may affect to other things.
--
*****************************************
Oswaldo Hernández
oswaldo (@) soft-com (.) es
*****************************************
More information about the wxpython-users
mailing list