I have an XML editor running in a StyledTextCtrl. I also have a TreeCtrl in the same panel that shows a simplified tree structure of teh XML. If I select an item in the tree, the StyledTextCtrl moves the cursor to the appropriate line, and then raises the StyledTextCtrl.
However, if I double click on a tree item, the cursor in the StyledTextCtrl moves, but the STC doesn’t take contjoshuae
Arg. Text Expansion Macro kicked in.
Anyway, I’m capturing the EVT_TREE_ITEM_ACTIVATED item event, and using wx.CallLater to call editor.Raise(). The window scrolls as needed no matter what, it just doesn’t change focus on a double click of the tree item.
How can I force it to move the focus to the editor? I’ve tried SetFocus and SetFocusFromKbd and neither one has worked.
Josh
···
On Thursday, September 11, 2014 2:12:24 PM UTC-7, Josh English wrote:
I have an XML editor running in a StyledTextCtrl. I also have a TreeCtrl in the same panel that shows a simplified tree structure of teh XML. If I select an item in the tree, the StyledTextCtrl moves the cursor to the appropriate line, and then raises the StyledTextCtrl.
However, if I double click on a tree item, the cursor in the StyledTextCtrl moves, but the STC doesn’t take cont
Can you send a test demo file?
Saludos / Best regards
Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Mascotas Perdidas:: http://mascotas-perdidas.com/
Google Talk / Y! messenger / Skype: mlacunzav
MSN: mlacunzav@hotmail.com
···
El 11/09/14 a las #4, Josh English escribió:
On Thursday, September 11, 2014 2:12:24 PM UTC-7, Josh English wrote:
I have an XML editor running in a StyledTextCtrl. I also have a
TreeCtrl in the same panel that shows a simplified tree structure
of teh XML. If I select an item in the tree, the StyledTextCtrl
moves the cursor to the appropriate line, and then raises the
StyledTextCtrl.
However, if I double click on a tree item, the cursor in the
StyledTextCtrl moves, but the STC doesn't take cont
Arg. Text Expansion Macro kicked in.
Anyway, I'm capturing the EVT_TREE_ITEM_ACTIVATED item event, and using wx.CallLater to call editor.Raise(). The window scrolls as needed no matter what, it just doesn't change focus on a double click of the tree item.
How can I force it to move the focus to the editor? I've tried SetFocus and SetFocusFromKbd and neither one has worked.
Josh
--
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 <mailto:wxpython-users+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
Here’s the file. It’s got more than it needs to see the problem, but apparently out of all the permutations I tried, wx.CallAfter(self.editor.SetFocus) wasn’t one of them, because that’s working now.
I hate myself.
Josh
xmledit.py (11 KB)
···
On Thursday, September 11, 2014 2:21:13 PM UTC-7, Mario Lacunza wrote:
Can you send a test demo file?
Saludos / Best regards
Mario Lacunza
Email:: mlac...@gmail.com
Personal Website:: [http://www.lacunza.biz/](http://www.lacunza.biz/)
Hosting:: [http://mlv-host.com/](http://mlv-host.com/)
Mascotas Perdidas:: [http://mascotas-perdidas.com/](http://mascotas-perdidas.com/)
Google Talk / Y! messenger / Skype: mlacunzav
MSN: mlac...@hotmail.com
El 11/09/14 a las #4, Josh English escribió:
On Thursday, September 11, 2014 2:12:24 PM UTC-7, Josh English > > wrote:
I have an XML editor running in a
StyledTextCtrl. I also have a TreeCtrl in the same panel
that shows a simplified tree structure of teh XML. If I
select an item in the tree, the StyledTextCtrl moves the
cursor to the appropriate line, and then raises the
StyledTextCtrl.
However, if I double click on a tree item, the cursor
in the StyledTextCtrl moves, but the STC doesn’t take cont
Arg. Text Expansion Macro kicked in.
Anyway, I'm capturing the EVT_TREE_ITEM_ACTIVATED item
event, and using wx.CallLater to call editor.Raise(). The
window scrolls as needed no matter what, it just doesn’t
change focus on a double click of the tree item.
How can I force it to move the focus to the editor? I've
tried SetFocus and SetFocusFromKbd and neither one has worked.
Josh
–
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-user...@googlegroups.com.
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
So no more problems with this then?
···
On Thursday, September 11, 2014 3:01:54 PM UTC-7, Josh English wrote:
Here’s the file. It’s got more than it needs to see the problem, but apparently out of all the permutations I tried, wx.CallAfter(self.editor.SetFocus) wasn’t one of them, because that’s working now.