I am having a rather serious problem with wx.DatePickerCtrl. I have a
dialog box that pops up with a DatePickerCtrl widget and a couple of
other numeric widgets along with "Okay" and "Cancel" buttons. When the
focus goes on the DatePickerCtrl it gets stuck there. The tab key no
longer changes focus to the next widget. I have to use the mouse to
select another widget. Futhermore, if I type in a date and then hit
the enter key, instead of tabbing it closes the dialog. However, the
value read from the control after the dialog is closed is today's
date, regardless of what was typed in.
Hi Glenn,
···
2009/7/8 Glenn Johnson <glennpj@gmail.com>:
I am having a rather serious problem with wx.DatePickerCtrl. I have a
dialog box that pops up with a DatePickerCtrl widget and a couple of
other numeric widgets along with "Okay" and "Cancel" buttons. When the
focus goes on the DatePickerCtrl it gets stuck there. The tab key no
longer changes focus to the next widget. I have to use the mouse to
select another widget. Futhermore, if I type in a date and then hit
the enter key, instead of tabbing it closes the dialog. However, the
value read from the control after the dialog is closed is today's
date, regardless of what was typed in.
You may want to create a sample app to demonstrate the problem and let
people play with it. See MakingSampleApps - wxPyWiki.
Don't forget to mention what version of wxPython you're using on what
platform as well.
Cheers, Frank
I am attaching a sample dialog to this e-mail. One thing I noticed is
that if I click on the OK button with the mouse then the date is
correct. It is when I type the date and press enter that the date is
wrong. Could this be related to the stuck focus problem?
datepicker_problem.py (1.67 KB)
···
On Wed, 2009-07-08 at 22:27 +0200, Frank Niessink wrote:
Hi Glenn,
2009/7/8 Glenn Johnson <glennpj@gmail.com>:
>
> I am having a rather serious problem with wx.DatePickerCtrl. I have a
> dialog box that pops up with a DatePickerCtrl widget and a couple of
> other numeric widgets along with "Okay" and "Cancel" buttons. When the
> focus goes on the DatePickerCtrl it gets stuck there. The tab key no
> longer changes focus to the next widget. I have to use the mouse to
> select another widget. Futhermore, if I type in a date and then hit
> the enter key, instead of tabbing it closes the dialog. However, the
> value read from the control after the dialog is closed is today's
> date, regardless of what was typed in.You may want to create a sample app to demonstrate the problem and let
people play with it. See MakingSampleApps - wxPyWiki.
Don't forget to mention what version of wxPython you're using on what
platform as well.
--
Glenn Johnson <glennpj@gmail.com>
009/7/8 Glenn Johnson <glennpj@gmail.com>:
I am attaching a sample dialog to this e-mail. One thing I noticed is
that if I click on the OK button with the mouse then the date is
correct. It is when I type the date and press enter that the date is
wrong. Could this be related to the stuck focus problem?
The dialog works for me as expected (Windows XP, wxPython
2.8.9.2-unicode). I can enter dates, pressing '-' moves the cursor to
the next field in the date picker, tab moves to the next control and
enter closes the dialog. Closing the dialog with enter or with the OK
button makes no differences: the correct date gets printed to stdout
in both cases.
Cheers, Frank
···
On Wed, 2009-07-08 at 22:27 +0200, Frank Niessink wrote:
So this is a wxGTK problem then I suppose. I had put a
'print wx.version()'
in the sample code so I guess you saw that I am using wx 2.8.10.1
(gtk2-unicode). Is there a chance this could be a version problem?
···
On Thu, 2009-07-09 at 00:47 +0200, Frank Niessink wrote:
009/7/8 Glenn Johnson <glennpj@gmail.com>:
> On Wed, 2009-07-08 at 22:27 +0200, Frank Niessink wrote:
>
> I am attaching a sample dialog to this e-mail. One thing I noticed is
> that if I click on the OK button with the mouse then the date is
> correct. It is when I type the date and press enter that the date is
> wrong. Could this be related to the stuck focus problem?The dialog works for me as expected (Windows XP, wxPython
2.8.9.2-unicode). I can enter dates, pressing '-' moves the cursor to
the next field in the date picker, tab moves to the next control and
enter closes the dialog. Closing the dialog with enter or with the OK
button makes no differences: the correct date gets printed to stdout
in both cases.
--
Glenn Johnson <glennpj@gmail.com>
Glenn Johnson wrote:
009/7/8 Glenn Johnson <glennpj@gmail.com>:
I am attaching a sample dialog to this e-mail. One thing I noticed is
that if I click on the OK button with the mouse then the date is
correct. It is when I type the date and press enter that the date is
wrong. Could this be related to the stuck focus problem?The dialog works for me as expected (Windows XP, wxPython
2.8.9.2-unicode). I can enter dates, pressing '-' moves the cursor to
the next field in the date picker, tab moves to the next control and
enter closes the dialog. Closing the dialog with enter or with the OK
button makes no differences: the correct date gets printed to stdout
in both cases.So this is a wxGTK problem then I suppose. I had put a
'print wx.version()'
in the sample code so I guess you saw that I am using wx 2.8.10.1
(gtk2-unicode). Is there a chance this could be a version problem?
Um, how can we see what is printed on your system if all you give us is the source code? When we run it then it prints the version on our system!
Anyway, it's a problem on Mac too. My guess is that since the generic widget is embedding a wx.TextCtrl inside a wx.Control then when the textctrl gets the focus the tab traversal support provided by the parent dialog or panel is confused because the intermediate widgets are not participating correctly. Try adding the wx.TAB_TRAVERSAL style to the date picker widget for a workaround, and open a wxTrac ticket about it.
···
On Thu, 2009-07-09 at 00:47 +0200, Frank Niessink wrote:
On Wed, 2009-07-08 at 22:27 +0200, Frank Niessink wrote:
--
Robin Dunn
Software Craftsman
Um, how can we see what is printed on your system if all you give us is
the source code? When we run it then it prints the version on our
system!
*Blush*
I got that from reading "Other Helpful hints" number 1 on
MakingSampleApps - wxPyWiki. I obviously did not think
that through.
Anyway, it's a problem on Mac too. My guess is that since the generic
widget is embedding a wx.TextCtrl inside a wx.Control then when the
textctrl gets the focus the tab traversal support provided by the parent
dialog or panel is confused because the intermediate widgets are not
participating correctly. Try adding the wx.TAB_TRAVERSAL style to the
date picker widget for a workaround, and open a wxTrac ticket about it.
Adding wx.TAB_TRAVERSAL does fix the tab/focus problem. However, there
is still the problem that typing into the date field and pressing the
enter key closes the dialog and yields the current date rather than the
typed in date. That problem is actually more serious in nature. If I
type in a date and press the tab key first (now that it works with
TAB_TRAVERSAL) and then hit the enter key then the returned date is
correct. Perhaps the Enter key could be disabled for that control? It is
too easy to get the wrong date entered into the back end database.
To make sure I am giving complete information, here are the versions
that I have:
Python 2.6.2
wxpython 2.8.10.1
wxgtk 2.8.10.1
Thanks.
···
On Wed, 2009-07-08 at 18:50 -0700, Robin Dunn wrote:
--
Glenn Johnson <glennpj@gmail.com>
Glenn Johnson wrote:
However, there
is still the problem that typing into the date field and pressing the
enter key closes the dialog and yields the current date rather than the
typed in date. That problem is actually more serious in nature. If I
type in a date and press the tab key first (now that it works with
TAB_TRAVERSAL) and then hit the enter key then the returned date is
correct. Perhaps the Enter key could be disabled for that control? It is
too easy to get the wrong date entered into the back end database.
Please make a wxTrac ticket about this. Be sure to mention that it is the generic version of the control.
···
--
Robin Dunn
Software Craftsman
Hi all,
on various linux system, such like this one :
Python 2.7.9
wxGTK 3.0.2
wxPython 3.0.2.0
the problem is still present on my point of view.
The code is :
import wx
from wx.lib.masked import NumCtrl
print wx.version()
class Problem(wx.Dialog):
def init(self, title, num2):
wx.Dialog.init(self, None, -1, title)
vbox = wx.BoxSizer(wx.VERTICAL)
vslot1 = wx.BoxSizer(wx.VERTICAL)
vbox.Add(vslot1, 1, wx.GROW)
vslot2 = wx.FlexGridSizer(rows=4, cols=2, hgap=5, vgap=5)
vbox.Add(vslot2)
label = wx.StaticText(self, -1,
“”"
Typing Tab key in DatePickerCtrl doesn’t move the focus.
“”")
vslot1.Add(label, 1, wx.ALIGN_CENTER | wx.BOTTOM, 20)
label.SetForegroundColour(“Blue”)
date_label = wx.StaticText(self, -1,
“Date (focus gets stuck here)”)
self.dpc = wx.DatePickerCtrl(self, -1, size=(120,-1), style = wx.TAB_TRAVERSAL)
vslot2.Add(date_label)
vslot2.Add(self.dpc)
num1_label = wx.StaticText(self, -1,
"Number 1 ")
self.num1_numctrl = NumCtrl(self, -1,
fractionWidth=6, selectOnEntry=False)
vslot2.Add(num1_label)
vslot2.Add(self.num1_numctrl)
sizer = self.CreateSeparatedButtonSizer(wx.OK | wx.CANCEL)
vbox.Add(sizer, 0, wx.GROW)
self.SetSizer(vbox)
self.Fit()
self.num1_numctrl.SetFocus()
if name == ‘main’:
app=wx.App()
dialog = Problem(‘DatePicker Problem’, 50.00)
result = dialog.ShowModal()
if result == wx.ID_OK:
print “OK”
print dialog.dpc.GetValue()
else:
print “Cancel”
dialog.Destroy()
What do you think I’m missing ?
Thanks in advance
···
On Wed, 2009-07-08 at 18:50 -0700, Robin Dunn wrote:
Adding wx.TAB_TRAVERSAL does fix the tab/focus problem.
Python 2.6.2
wxpython 2.8.10.1
wxgtk 2.8.10.1
Thanks.
I join the source file…
datepicker_problem.py (1.3 KB)
Hi,
I join the source file...
Can you try placing the panel onto the dialog and then make all
controls children of that
panel?
Thank you.
···
On Fri, Jun 9, 2017 at 2:52 PM, <zylyco@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Igor,
here’s what I think you ask me for (not the same code, but a different way).
Thanks
datepickerctrl-test.py (4.37 KB)
···
On Fri, Jun 9, 2017 at 2:52 PM, zyl...@gmail.com wrote:
I join the source file…
Can you try placing the panel onto the dialog and then make all
controls children of that
panel?
Hi again,
I’m still stucked, as my datepickerctrl focus…
Sorry to reuse this old post, but I tried various methods without success :
- with wx.TAB_TRAVERSAL, and/or with wx.WANTS_CHARS
- but the datepickerctrl only knows wx.EVT_DATE_CHANGED
For memory, my system is based on Linux (various distribution like openSuse, Ubuntu, Fedora, Mint , etc, are used), with :
Python 2.7.9
wxGTK 3.0.2
wxPython 3.0.2.0
datepickerctrl-focus-freeze.py (3.49 KB)
···
on any of these plaforms, the Tab key pressed within the datepickerctrl, doesn’t produce the navigation to the next widget. I tried wxPython Phoenix 4.0.3a as well, and I got the same behaviour, as I said :
also the datepickerctrl widget can’t reach to free the focus using the “Tab key” …
Here’s attached to this message, a new source code, to use on a Linux system.
Are there people developing on Linux on board ?
Don’t you use datepickerctrl on linux ?
Am I doing things in a wrong way…
Any help would be very appreciate.
Note:
I apologize for the flow of my words, it’s due to my knowledge with the English language which is quite short.
Hi,
I tried to use the DatePickerCtrl widget with a C++ code, using wxWidgets 3.0.2 :
the Tab key on this widget doesn’t navigate the focus either…
This seems a wxWidgets issue.
You can try by yourself with the files joined.
It’s a pitty for me, because users prefer “Tab” key to navigate quickly.
I have to find another trick for my project. In this case, I’ll post it.
Regards.
main.cpp (2.26 KB)
main.h (1.32 KB)
Hi,
Hi,
I tried to use the DatePickerCtrl widget with a C++ code, using wxWidgets
3.0.2 :
the Tab key on this widget doesn't navigate the focus either...This seems a wxWidgets issue.
You can try by yourself with the files joined.
It's a pitty for me, because users prefer "Tab" key to navigate quickly.
I have to find another trick for my project. In this case, I'll post it.
Are you using Linux?
What is you GTK+ version?
Did you try Windows/OSX as well?
Could you search if it is a known issue on trac.wxwidgets.org?
Thank you.
···
On Thu, Jun 15, 2017 at 12:45 PM, <zylyco@gmail.com> wrote:
Regards.
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I’m sorry guys could better explain what you mean by “doesn’t navigate the focus” I ran your python code using win10, Phoenix and Python 3.x (had to make some minor changes). And I was able to navigate between the two date inputs. I could pick a date with or without the check box and use the tab key to navigate to the next date input. The only thing I noticed was it took two tab pushes to get to the first date input from the second input. I think the panel was getting the focus on the first tab.
···
On Thu, Jun 15, 2017 at 9:54 AM, Igor Korot ikorot01@gmail.com wrote:
Hi,
On Thu, Jun 15, 2017 at 12:45 PM, zylyco@gmail.com wrote:
Hi,
I tried to use the DatePickerCtrl widget with a C++ code, using wxWidgets
3.0.2 :
the Tab key on this widget doesn’t navigate the focus either…
This seems a wxWidgets issue.
You can try by yourself with the files joined.
It’s a pitty for me, because users prefer “Tab” key to navigate quickly.
I have to find another trick for my project. In this case, I’ll post it.
Are you using Linux?
What is you GTK+ version?
Did you try Windows/OSX as well?
Could you search if it is a known issue on trac.wxwidgets.org?
Thank you.
Regards.
–
You received this message because you are subscribed to the Google Groups
“wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
–
You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Are you using Linux?
What is you GTK+ version?
Did you try Windows/OSX as well?
Could you search if it is a known issue on trac.wxwidgets.org?
Thank you.
My software with wxPython/DatePickerCtrl runs as expected on Windows :
inside the widget, I press " Tab " key, on the “focus” jumps to the next widget.
But on each Linux system I tried (Ubuntu, openSuse, Fedora, Mint, MageIA, CentOS, Debian), in case I used the packages provides for wxPython, but as well if I’ve installed it from sources :
when the " focus " is inside the DatePickerCtrl, the " Tab " Key used to “jump” to the next Widget is not working… I’m blocked inside the DatePickerCtrl, and the only way to move from here, is to use the mouse to select the next widget…
I don’t have tried on OSx, because I don’t use it, so I don’t know for this system.
On each of my Linux systems, I have :
Python 2.7.x
wxGTK 3.0.2
wxPython 3.0.2.0
I repeat, on Windows7/8/10, I don’t have any kind of problem with this Widget, it works fine.
But I’ve noticed this behaviour on all the Linux systems I’m using…
I checked on trac.wxwidgets.org an found :
http://trac.wxwidgets.org/ticket/11630
I’ll post there a message tomorrow to report the issue again.
Bye
Hi,
Are you using Linux?
What is you GTK+ version?Did you try Windows/OSX as well?
Could you search if it is a known issue on trac.wxwidgets.org?Thank you.
My software with wxPython/DatePickerCtrl runs as expected on Windows :
inside the widget, I press " Tab " key, on the "focus" jumps to the next
widget.But on each Linux system I tried (Ubuntu, openSuse, Fedora, Mint, MageIA,
CentOS, Debian), in case I used the packages provides for wxPython, but as
well if I've installed it from sources :
when the " focus " is inside the DatePickerCtrl, the " Tab " Key used to
"jump" to the next Widget is not working... I'm blocked inside the
DatePickerCtrl, and the only way to move from here, is to use the mouse to
select the next widget...I don't have tried on OSx, because I don't use it, so I don't know for this
system.On each of my Linux systems, I have :
Python 2.7.x
wxGTK 3.0.2
wxPython 3.0.2.0
Was you wxWidgets C++ code compiled against GTK+2 or GTK+3?
What is an exact version?
Thank you.
···
On Thu, Jun 15, 2017 at 1:37 PM, <zylyco@gmail.com> wrote:
I repeat, on Windows7/8/10, I don't have any kind of problem with this
Widget, it works fine.But I've noticed this behaviour on all the Linux systems I'm using...
I checked on trac.wxwidgets.org an found :
wxTrac has been migrated to GitHub Issues - wxWidgets
I'll post there a message tomorrow to report the issue again.Bye
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Was you wxWidgets C++ code compiled against GTK+2 or GTK+3?
What is an exact version?
I had run :
g++ main.cpp main.h wx-config --cxxflags --libs
-o simple
[regis@localhost cpp-gtk3]$ wx-config --list
Default config is gtk2-unicode-3.0
Default config will be used for output
But I’ve run too with this command :
g++ main.cpp main.h wx-config-3.0 --cxxflags --libs
-o simple
And the result was the same as bad…
Thanks
the Tab key on this widget doesn't navigate the focus either...
You can try by yourself with the files joined.
small wonder! You used wxglade ! wxglade never works for anything !
you delivered the proof yourself !