| | |
Text Copy in HtmlWindow
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2008
Posts: 41
Reputation:
Solved Threads: 1
Hi. I have an HTML Control on my frame and I am able to display pages in it:
However, I'm having real problems trying to pick up a CTRL + C event (Or a right mouse click event) to copy any selected text.
Iv looked through the wxDemo, but I cant understand how the events work. Can anyone help please?
Regards
Max
Python Syntax (Toggle Plain Text)
self.krtc = html.HtmlWindow(self, style=wx.NO_FULL_REPAINT_ON_RESIZE); self.krtc.LoadPage("apitest.html")
However, I'm having real problems trying to pick up a CTRL + C event (Or a right mouse click event) to copy any selected text.
Iv looked through the wxDemo, but I cant understand how the events work. Can anyone help please?
Regards
Max
•
•
Join Date: Nov 2008
Posts: 41
Reputation:
Solved Threads: 1
Well, Iv had a little joy so far - Iv managed to get a click event recognised like this:
This works nicely, and could easily copy the selected text, but its not of much use unless the user knows that the text has been copied!
More to the point, Iv not been able to pick up any keyboard events yet, which rules out one of the most common methods of copying selected text!
Any ideas anyone?
regards
Max
python Syntax (Toggle Plain Text)
self.Bind(html.EVT_HTML_CELL_CLICKED, self.krtc_OnClick, self.docMAIN) ... ... ... def krtc_OnClick(self,event): x = self.krtc.SelectionToText() if x > "": print x
This works nicely, and could easily copy the selected text, but its not of much use unless the user knows that the text has been copied!
More to the point, Iv not been able to pick up any keyboard events yet, which rules out one of the most common methods of copying selected text!
Any ideas anyone?
regards
Max
![]() |
Other Threads in the Python Forum
- Previous Thread: Help with finding out if a program exists in os path entries
- Next Thread: Questions on How to Perform Certain Concepts
Views: 373 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for Python
approximation array beginner book builtin change cipher clear client code color converter countpasswordentry cturtle curved def dictionary drive dynamic examples excel file float format ftp function gui homework import inches input java library line lines linux list lists loop microcontroller mouse mysqldb mysqlquery newb number numbers output parsing path plugin port prime program programming projects py2exe pygame pymailer pyqt python random recursion recursive redirect remote script scrolledtext search singleton socket sqlite ssh string strings strip subprocess sum syntax table terminal text textarea thread threading time tkinter tlapse tuple tutorial twoup ubuntu unicode urllib urllib2 variable vigenere wikipedia windows wxpython xlwt





