Hi list,
I have two questions about ListCtrl. I create a small app that show db
data into a ListCtrl.
1) When I scroll data with the key (UP, DOWN), sometime I receive an error:
wx.ListCtrl.RefreshItems(self, start, stop)
File
"/usr/lib/python2.4/site-packages/wx-2.7.0-gtk2-unicode/wx/_controls.py",
line 4463, in RefreshItems
return _controls_.ListCtrl_RefreshItems(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "lineFrom <= lineTo" failed at
../src/generic/listctrl.cpp(2498) in RefreshLines(): indices in disorder
What can be?
2) On win the "return", "space", "escape", etc... keys (so the function
keys) are passed to the ListCtrl OnChar event, but on lin not. Is there
a solution for say to wx to pass them (generate an event) on these keys?
Win2k and wx 2.6.3 unicode
debian 3.1 wx 2.6.3 and 2.7.0
wxListCtrl style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_SINGLE_SEL|wx.WANTS_CHARS
Hi list,
I have two questions about ListCtrl. I create a small app that show db
data into a ListCtrl.
1) When I scroll data with the key (UP, DOWN), sometime I receive an error:
wx.ListCtrl.RefreshItems(self, start, stop)
File
"/usr/lib/python2.4/site-packages/wx-2.7.0-gtk2-unicode/wx/_controls.py",
line 4463, in RefreshItems
return _controls_.ListCtrl_RefreshItems(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "lineFrom <= lineTo" failed at
../src/generic/listctrl.cpp(2498) in RefreshLines(): indices in disorder
What can be?
First, why do you call wx.ListCtrl.RefreshItems(self, start, stop) instead of self.RefreshItems(start, stop)? Second, is start > stop?
2) On win the "return", "space", "escape", etc... keys (so the function
keys) are passed to the ListCtrl OnChar event, but on lin not. Is there
a solution for say to wx to pass them (generate an event) on these keys?
What is meant by "on lin" ? Whatever it is you can probably get it by using a EVT_KEY_DOWN handler.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
This might be an obvious thing I am missing, but I can't figure out how to being a wx.Frame to the front. Normally, frames are automatically created on top of all the others, but for some reason since I am creating this frame after the user double clicks on a ListCtrl item (an EVT_LIST_ITEM_ACTIVATED event) that form stays on top with focus, as if the second click brings it forward. If use enter to select the item instead, the frame pops up in front like normal.
This might be an obvious thing I am missing, but I can't figure out how to being a wx.Frame to the front. Normally, frames are automatically created on top of all the others, but for some reason since I am creating this frame after the user double clicks on a ListCtrl item (an EVT_LIST_ITEM_ACTIVATED event) that form stays on top with focus, as if the second click brings it forward. If use enter to select the item instead, the frame pops up in front like normal.
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.3/423 - Release Date: 8/18/2006
This might be an obvious thing I am missing, but I can't figure out
how to being a wx.Frame to the front. Normally, frames are
automatically created on top of all the others, but for some reason
since I am creating this frame after the user double clicks on a
ListCtrl item (an EVT_LIST_ITEM_ACTIVATED event) that form stays on
top with focus, as if the second click brings it forward. If use
enter to select the item instead, the frame pops up in front like
normal.
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Thanks, I did try that, and unfortunately didn't help. I've tried calling Raise at various times (as late as possible after the form is created, in the __init__ method for the form etc.) but no luck. I've tried calling Lower on the frame that's stubbornly staying on top, but that's not helping neither.
···
On 2006/08/22, at 11:20, Nizam Sayeed wrote:
Robert Gravina wrote:
Hello list!
This might be an obvious thing I am missing, but I can't figure out how to being a wx.Frame to the front. Normally, frames are automatically created on top of all the others, but for some reason since I am creating this frame after the user double clicks on a ListCtrl item (an EVT_LIST_ITEM_ACTIVATED event) that form stays on top with focus, as if the second click brings it forward. If use enter to select the item instead, the frame pops up in front like normal.
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.3/423 - Release Date: 8/18/2006
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Thanks, I did try that, and unfortunately didn't help. I've tried calling Raise at various times (as late as possible after the form is created, in the __init__ method for the form etc.) but no luck. I've tried calling Lower on the frame that's stubbornly staying on top, but that's not helping neither.
Try delaying the creation of the 2nd frame until all of the events associated with the double click have time to complete.
···
On 2006/08/22, at 11:20, Nizam Sayeed wrote:
Robert Gravina wrote:
Hello list!
This might be an obvious thing I am missing, but I can't figure out how to being a wx.Frame to the front. Normally, frames are automatically created on top of all the others, but for some reason since I am creating this frame after the user double clicks on a ListCtrl item (an EVT_LIST_ITEM_ACTIVATED event) that form stays on top with focus, as if the second click brings it forward. If use enter to select the item instead, the frame pops up in front like normal.
I am having a similar problem as this thread. I have a bunch of frames with plots in them. I have an additional frame that allows for analysis of the currently selected (or last selected) plot frame. To activate the analysis window, they Alt + right click on the plot and choose from a popup menu. I can never get the analysis frame to be on top. I have made a stripped down version of what I'm doing and am attaching it to this message.
Try delaying the creation of the 2nd frame until all of the events associated with the double click have time to complete.
How would I do this?
The same as any other delayed effect in wxPython. Move the code that creates the new frame into another function, and then invoke that function via either wx.CallAfter or wx.FutureCall.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Thank you! I just grabbed a copy of the ...in Action book. I've been using the demo and the wxDocsViewer as my major source of information up to now, but they have been kind of lacking for this kind of information.