I am new to wx.python and programming in general. It is going fairly well but
I am trying to set up a search form where one of the optional parameters is a
date field. I like the look of the wx.DatePickerCtrl but I can't figure out if
it is possible to place it on a form without it preselecting a date.
There's the wx.DP_ALLOWNONE style. According to the docs, "With this
style, the control allows the user to not enter any valid date at all.
Without it - the default - the control always has some valid date."
HTH, Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
I got the following error:
C:\Python\_spe\test\hotelTestMain4.py
Traceback (most recent call last):
File "C:\Python\_spe\test\hotelTestMain4.py", line 2436, in
app = MyApp(0)
File "c:\python\lib\site-packages\wx-2.8-msw-ansi\wx\_core.py", line 7757, in __init__
self._BootstrapApp()
File "c:\python\lib\site-packages\wx-2.8-msw-ansi\wx\_core.py", line 7354, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "C:\Python\_spe\test\hotelTestMain4.py", line 2431, in OnInit
frame = MainScreen(None, -1, 'Hotel Main Menu')
File "C:\Python\_spe\test\hotelTestMain4.py", line 680, in __init__
self.book.AddPage(self.CreatePage4(caption), caption, True, -1)
File "C:\Python\_spe\test\hotelTestMain4.py", line 1660, in CreatePage4
self.arrivalCal = wx.DatePickerCtrl(datePanel, size=(120,-1),style=wx.DP_DROPDOWN | wx.DP_SHOWCENTURY | wx.DP_ALLOWNONE)
File "c:\python\lib\site-packages\wx-2.8-msw-ansi\wx\_controls.py", line 6381, in __init__
_controls_.DatePickerCtrl_swiginit(self,_controls_.new_DatePickerCtrl(*args, **kwargs))
wx._core.PyAssertionError: C++ assertion "IsValid()" failed at ..\..\include\wx/datetime.h(1675) in wxDateTime::GetTicks(): invalid wxDateTime
I am running Windows 2000 sp4, wxPython 2.8.1 and I believe Python2.6
I am new to wx.python and programming in general. It is going fairly well but
I am trying to set up a search form where one of the optional parameters is a
date field. I like the look of the wx.DatePickerCtrl but I can't figure out if
it is possible to place it on a form without it preselecting a date.
There's the wx.DP_ALLOWNONE style. According to the docs, "With this
style, the control allows the user to not enter any valid date at all.
Without it - the default - the control always has some valid date."
HTH, Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
I got the following error:
C:\Python\_spe\test\hotelTestMain4.py
Traceback (most recent call last):
File "C:\Python\_spe\test\hotelTestMain4.py", line 2436, in
app = MyApp(0)
File "c:\python\lib\site-packages\wx-2.8-msw-ansi\wx\_core.py", line 7757, in __init__
self._BootstrapApp()
File "c:\python\lib\site-packages\wx-2.8-msw-ansi\wx\_core.py", line 7354, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "C:\Python\_spe\test\hotelTestMain4.py", line 2431, in OnInit
frame = MainScreen(None, -1, 'Hotel Main Menu')
File "C:\Python\_spe\test\hotelTestMain4.py", line 680, in __init__
self.book.AddPage(self.CreatePage4(caption), caption, True, -1)
File "C:\Python\_spe\test\hotelTestMain4.py", line 1660, in CreatePage4
self.arrivalCal = wx.DatePickerCtrl(datePanel, size=(120,-1),style=wx.DP_DROPDOWN | wx.DP_SHOWCENTURY | wx.DP_ALLOWNONE)
File "c:\python\lib\site-packages\wx-2.8-msw-ansi\wx\_controls.py", line 6381, in __init__
_controls_.DatePickerCtrl_swiginit(self,_controls_.new_DatePickerCtrl(*args, **kwargs))
wx._core.PyAssertionError: C++ assertion "IsValid()" failed at ..\..\include\wx/datetime.h(1675) in wxDateTime::GetTicks(): invalid wxDateTime
I am running Windows 2000 sp4, wxPython 2.8.1 and I believe Python2.6
This should have been fixed. Upgrade to wxPython 2.8.4.
···
2007/5/25, Tom Keating <1beast@comcast.net>:
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Well, it looks like I’m back to ActiveX IEHtmlWindow… None of the
other alternatives quite work…
Is there a way to set the html content of the document to a
string? Needs to be fast, so saving to a temp file is not ideal.
Is there a way to navigate the xhtml document tree?
Is there a way to append a block of html to the end of the
block?
I think I know the answer to this, but I might as well ask it again in
case I missed something... Is there a workable alternative to the IE
control? Here's a summary of what I've tried:
- wxHtmlWindow: Nice interaction with python, but doesn't have
enough support for actual web pages for my purposes (wxHtmlWindow
supports a subset of html, and is not intended as a browser)
- wxMozilla: Apparently a dead project?
- wxWebKit: Very promising. This will be perfect when it's
finished, but I need to be in production by the end of the year, and
wxWebKit is pre-beta. When it's ready I'll switch to it to get
Linux/Mac compatibility.
- Ken
I think it would be very cool to add a python shell window to the demo underneath the stdout window. It would be available for all demos. The purpose would be to allow the programmer to try stuff interactively in the interpreter. The module and the window pane for the currently selected demo would be added to the interpreter namespace.
Send me a +1 vote if you want to see this. Maybe I will add it.
Well, it looks like I’m back to ActiveX IEHtmlWindow… None of the
other alternatives quite work…
Is there a way to set the html content of the document to a
string? Needs to be fast, so saving to a temp file is not ideal.
Is there a way to navigate the xhtml document tree?
Is there a way to append a block of html to the end of the
block?
Ah, just found the LoadString method. But because of the asymmetry
between LoadString and AddText, I have to keep a copy of the html
content (which I can do because I happen to only use LoadString to set
the content). But that’s okay, I think maybe I can get this to work.
Apparently there is no way to access the “document” property because of
lack of support for abstract types. Is this true?
···
I think I know the answer to this, but I might as well ask it again in
case I missed something… Is there a workable alternative to the IE
control? Here’s a summary of what I’ve tried:
wxHtmlWindow: Nice interaction with python, but doesn’t have
enough support for actual web pages for my purposes (wxHtmlWindow
supports a subset of html, and is not intended as a browser)
wxMozilla: Apparently a dead project?
wxWebKit: Very promising. This will be perfect when it’s
finished, but I need to be in production by the end of the year, and
wxWebKit is pre-beta. When it’s ready I’ll switch to it to get
Linux/Mac compatibility.
I think it would be very cool to add a python shell window to the demo
underneath the stdout window. It would be available for all demos. The
purpose would be to allow the programmer to try stuff interactively in
the interpreter. The module and the window pane for the currently
selected demo would be added to the interpreter namespace.
Send me a +1 vote if you want to see this. Maybe I will add it.
It was already added using the TimeMachine.
Just press F5 while in the Demo.
Also available on F6 is the widget inspector tool, which also contains a PyShell and other widgets to make it easy to inspect all the widgets and sizers in a running application. I often use it when people send code that is having layout or other problems to help me get a quick picture of what their current code is doing.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Well, it looks like I'm back to ActiveX IEHtmlWindow.... None of the other alternatives quite work...
1. Is there a way to set the html content of the document to a
string? Needs to be fast, so saving to a temp file is not ideal.
2. Is there a way to navigate the xhtml document tree?
3. Is there a way to append a block of html to the end of the
<body> block?
Ah, just found the LoadString method. But because of the asymmetry between LoadString and AddText, I have to keep a copy of the html content (which I can do because I happen to only use LoadString to set the content). But that's okay, I think maybe I can get this to work. Apparently there is no way to access the "document" property because of lack of support for abstract types. Is this true?
Yes, when using wx.activex.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
The scrollbars in the IEHtmlWindow don't belong to wxWidgets so it has no access to them. You are just seeing the default values for those methods if wx scrollbars were active for the window.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
The scrollbars in the IEHtmlWindow don't belong to wxWidgets so it has no access to them. You are just seeing the default values for those methods if wx scrollbars were active for the window.
Is there any workaround for this? I'm in trouble if I can't get and set the scrollbar position.
The scrollbars in the IEHtmlWindow don't belong to wxWidgets so it has no access to them. You are just seeing the default values for those methods if wx scrollbars were active for the window.
Is there any workaround for this?
Not that I know of, but perhaps you can get a low enough level of access using the win32com and win32api modules. Or perhaps ctypes. In other words if you can find the window handle of the IE window, or even the handles of the scrollbars, then you can call the raw win32 API functions using those handles and get what you need.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!