Andrea,
Hi Mike,
2009/6/16 Mike Driscoll:
> Andrea,
>> Hi All,
>> > Hi All,
>> >> Hello,
>> >>> I am trying to set the focus to the first control in a panel which is a
>> >>> page in the FNB.
>> >>> I always get the focus on the tab, also I tried:
>> >>> wx.CallLater(10, self.Navigate)
>> >>> or from a FNB page changed event:
>> >>> wx.CallAfter(self.searchCriteria.Navigate)
>> >>> or
>> >>> wx.CallAfter(self.searchCriteria..control.SetFocus)
>> >>> If I do:
>> >>> wx.CallLater(100, self.Navigate)
>> >>> it works, but this is really a hack and I am sure there is a more
>> >>> elegant/correct way of doing it.
>> >> I think I worked around this behavior in my local copy of fnb by
>> >> commenting out a SetFocus call in the FNB.PageContainer (see
>> >> Editra/src/extern/flatnotebook.py). I didn't want the tabs to ever
>> >> have focus so this worked for me a more general solution would
>> >> probably be to add another style parameter to the control for turning
>> >> this on and off.
>> > Probably adding a new style is the only way to support both behaviour.
>> > The problem is, I have probably run out of window styles for
>> > FlatNotebook (before conflicting with the wxWidgets window styles).
>> > I'll take a look at it tomorrow morning and see what can be done.
>> There is now an updated version of FlatNotebook in SVN which has a new
>> window style called FNB_NO_TAB_FOCUS. With this style specified, the
>> focus will not go on the notebook tabs but on the notebook pages
>> themselves. Thank you for the bug report/feature request!
>> Andrea.
> So, are all these window styles for your various cool widgets getting
> documented somewhere? I seem to recall you said you were going to, but
> I never saw a link...
They are documented as docstrings in the source code (not for all the
AGW widgets though), but it looks like epydoc is not picking their
docstrings: if you look in the New wxPyDocs page for FlatNotebook
here:
wxPython API Documentation — wxPython Phoenix 4.2.2 documentation
There are no window styles nor documentation for them (unless I am
unable to see them). But if you look at the source code here:
http://svn.wxwidgets.org/viewvc/wx/wxPython/3rdParty/AGW/agw/flatnote…
You'll see something like this:
# Use Visual Studio 2003 (VC7.1) style for tabs
FNB_VC71 = 1
"""Use Visual Studio 2003 (VC7.1) style for tabs"""
# Use fancy style - square tabs filled with gradient coloring
FNB_FANCY_TABS = 2
"""Use fancy style - square tabs filled with gradient coloring"""
And so on. This is true for AUI too and for some of the other widgets
(I don't recall which ones at the moment). Maybe the docstrings format
I used is incorrect, I am not sure how epydoc treats these constants.
Anyway, if you have a nice idea on how to present the different window
styles for AGW please let me know.
Andrea.
I remember seeing this stuff in the code. Hmmm...I guess I was
thinking of some kind of list of the styles with little snapshots of
the effect next to them. I must be more of a visual learner than I
realized.
No big deal either way. Reading the code and using your fancy demos
are usually enough.
- Mike
···
On Jun 17, 5:56 am, Andrea Gavana <andrea.gav...@gmail.com> wrote:
> On Jun 16, 3:09 am, Andrea Gavana <andrea.gav...@gmail.com> wrote:
>> On 15 June 2009 22:02, Andrea Gavana wrote:
>> > On Mon, Jun 15, 2009 at 2:41 PM, Cody Precord wrote:
>> >> On Mon, Jun 15, 2009 at 8:01 AM, Werner F. Bruhin<wbru...@gmail.com> wrote: