wx.Caret cannot show on mac(version: 4.0.3 osx-cocoa (phoenix) wxWidgets 3.0.5)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

wx.Caret cannot show on mac(version: 4.0.3 osx-cocoa (phoenix) wxWidgets 3.0.5)

张慧聪
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.

The document says:

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.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wx.Caret cannot show on mac(version: 4.0.3 osx-cocoa (phoenix) wxWidgets 3.0.5)

jie chen
兄弟,就为了光标闪几下啊,多看看文档,应该可以吧,不是有个设置闪动时间吗?

张慧聪 <[hidden email]> 于2018年12月6日周四 下午3:42写道:
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.

The document says:

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.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wx.Caret cannot show on mac(version: 4.0.3 osx-cocoa (phoenix) wxWidgets 3.0.5)

张慧聪
In reply to this post by 张慧聪
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.

I followed <a href="https://wxpython.org/Phoenix/docs/html/wx.Caret.html#wx.Caret" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwxpython.org%2FPhoenix%2Fdocs%2Fhtml%2Fwx.Caret.html%23wx.Caret\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvWFhVRc8dfm4zad4W7sqlUCrDZQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwxpython.org%2FPhoenix%2Fdocs%2Fhtml%2Fwx.Caret.html%23wx.Caret\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvWFhVRc8dfm4zad4W7sqlUCrDZQ&#39;;return true;">https://wxpython.org/Phoenix/docs/html/wx.Caret.html#wx.Caret 
The document says:

A caret is a blinking cursor showing the position where the typed text will appear.

Text controls usually have their own caret but <a href="https://wxpython.org/Phoenix/docs/html/wx.Caret.html#wx-caret" style="color:rgb(202,121,0);font-size:0.95em;letter-spacing:0.01em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwxpython.org%2FPhoenix%2Fdocs%2Fhtml%2Fwx.Caret.html%23wx-caret\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE7pucVMxUUBv5qOlUZe4xmZnmrpA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwxpython.org%2FPhoenix%2Fdocs%2Fhtml%2Fwx.Caret.html%23wx-caret\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE7pucVMxUUBv5qOlUZe4xmZnmrpA&#39;;return true;">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.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wx.Caret cannot show on mac(version: 4.0.3 osx-cocoa (phoenix) wxWidgets 3.0.5)

jie chen
把代码例子分享过来看看啊。

张慧聪 <[hidden email]> 于2018年12月6日周四 下午5:18写道:
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.

The document says:

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.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.