Hi, all. I tried to place a blink caret on my own Ctrl(named MyCtrl which extent wx.Control) to build a customer editor like wx.TextCtrl but with more functions.
A caret is a blinking cursor showing the position where the typed text will appear.
Text controls usually have their own caret but wx.Caret provides a way to use a caret in other windows.
I assigned a wx.Caret object to be a member of MyCtrl, and called Caref.Show when MyCtrl inited. I also called MyCtrl.SetCaret to set the caref to be the caref of MyCtrl.
When the program running, I called MyCtrl.GetCaret() and printed it. Everything goes well.
But, I just CANNOT see anything blink on the showing window. The caret.Move() and caret.GetPosition() seemed goes well. But there’s no caret shows out.
I searched for wx.Caret example. But find nothing. Does anyone have experience for using wx.Caret in your project? Did I do something wrong?
Hi, all. I tried to place a blink caret on my own Ctrl(named MyCtrl which extent wx.Control) to build a customer editor like wx.TextCtrl but with more functions.
A caret is a blinking cursor showing the position where the typed text will appear.
Text controls usually have their own caret but wx.Caret provides a way to use a caret in other windows.
I assigned a wx.Caret object to be a member of MyCtrl, and called Caref.Show when MyCtrl inited. I also called MyCtrl.SetCaret to set the caref to be the caref of MyCtrl.
When the program running, I called MyCtrl.GetCaret() and printed it. Everything goes well.
But, I just CANNOT see anything blink on the showing window. The caret.Move() and caret.GetPosition() seemed goes well. But there’s no caret shows out.
I searched for wx.Caret example. But find nothing. Does anyone have experience for using wx.Caret in your project? Did I do something wrong?
Thank you for your help.
–
You received this message because you are subscribed to the Google Groups “wxPython-users” group.
One more thing, I found that if I package the program by pyinstaller, then execute it, the caret shows normal. Strange.
···
On Thursday, December 6, 2018 at 3:42:30 PM UTC+8, 张慧聪 wrote:
Hi, all. I tried to place a blink caret on my own Ctrl(named MyCtrl which extent wx.Control) to build a customer editor like wx.TextCtrl but with more functions.
A caret is a blinking cursor showing the position where the typed text will appear.
Text controls usually have their own caret but wx.Caret provides a way to use a caret in other windows.
I assigned a wx.Caret object to be a member of MyCtrl, and called Caref.Show when MyCtrl inited. I also called MyCtrl.SetCaret to set the caref to be the caref of MyCtrl.
When the program running, I called MyCtrl.GetCaret() and printed it. Everything goes well.
But, I just CANNOT see anything blink on the showing window. The caret.Move() and caret.GetPosition() seemed goes well. But there’s no caret shows out.
I searched for wx.Caret example. But find nothing. Does anyone have experience for using wx.Caret in your project? Did I do something wrong?
One more thing, I found that if I package the program by pyinstaller, then execute it, the caret shows normal. Strange.
On Thursday, December 6, 2018 at 3:42:30 PM UTC+8, 张慧聪 wrote:
Hi, all. I tried to place a blink caret on my own Ctrl(named MyCtrl which extent wx.Control) to build a customer editor like wx.TextCtrl but with more functions.
A caret is a blinking cursor showing the position where the typed text will appear.
Text controls usually have their own caret but wx.Caret provides a way to use a caret in other windows.
I assigned a wx.Caret object to be a member of MyCtrl, and called Caref.Show when MyCtrl inited. I also called MyCtrl.SetCaret to set the caref to be the caref of MyCtrl.
When the program running, I called MyCtrl.GetCaret() and printed it. Everything goes well.
But, I just CANNOT see anything blink on the showing window. The caret.Move() and caret.GetPosition() seemed goes well. But there’s no caret shows out.
I searched for wx.Caret example. But find nothing. Does anyone have experience for using wx.Caret in your project? Did I do something wrong?
Thank you for your help.
–
You received this message because you are subscribed to the Google Groups “wxPython-users” group.