On Wed, 19 Mar 2008 17:53:07 -0700, Robin Dunn <robin@alldunn.com> wrote:
Franz Steinhäusler wrote:
For what I saw, that function is not working on gtk
Neither SetMark(x,y) not wx.CallAfter (SetMark, x, y)
Am I right?
Is that also a gtk "feature/bug"?
At least, trying in PyCrust it didn't yield any visible result.
It works for me. See attached.
Strange: for me it is not working, SetMark don't marks the text.
I can call .SetValue("text") which works, but not Setmark
If I select with mouse, than change to widget inspector tool, then the mark
disappears, but the getmark delivers the proper values
KUbuntu Gutsy
platform: linux2
python 2.5.1 final
wxpython version: 2.8.4.0
(wxgtk, unicode, gtk2, wx-assertions off, SWIG 1.3.29)
Could this be because that window is not focused? There is a style for textctrls that tells them to show
selected text even when window isn't focused, wx.TE_NOHIDESEL .
On Wed, 19 Mar 2008 17:53:07 -0700, Robin Dunn <robin@alldunn.com> wrote:
Franz Steinhäusler wrote:
For what I saw, that function is not working on gtk
Neither SetMark(x,y) not wx.CallAfter (SetMark, x, y)
Am I right?
Is that also a gtk "feature/bug"?
At least, trying in PyCrust it didn't yield any visible result.
It works for me. See attached.
Strange: for me it is not working, SetMark don't marks the text.
I can call .SetValue("text") which works, but not Setmark
If I select with mouse, than change to widget inspector tool, then the mark
disappears, but the getmark delivers the proper values
KUbuntu Gutsy
platform: linux2
python 2.5.1 final
wxpython version: 2.8.4.0
(wxgtk, unicode, gtk2, wx-assertions off, SWIG 1.3.29)
Please try 2.8.7.1
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I finally successfully compiled wxwidgets and wxpyhton from trunk svn,
but no SetMark is working.
(gtk2)
Could gtk be the reason?
Did you try it like I did in the screen shot where you interactively do it from a PyShell, or did you try it in a real program? If the former then it may have just been a fluke of my current theme that allowed the selection to be seen when another window had the focus. I wasn't expecting it to work that way.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Strange. I tried it after your screenshot. Very good tool this inspector, anyway.
I tried it also with the sample alone, with .SetMark and wx.CallAfter (SetMark, x, y).
None of that things worked.
Anyway, in the demo, after starting the combobox sample, the whole Text in the combobox
is selected. But then, I didn't got it to show the SetMark Selection.
Also I'm not 100% sure, but after call SetMark(4,7) afterwards (no selection was shown)I called GetMark and it outputs (7,7).
···
On Tue, 01 Apr 2008 10:19:24 -0700, Robin Dunn <robin@alldunn.com> wrote:
Franz Steinhäusler wrote:
On Tue, 25 Mar 2008 09:20:36 +0100, Franz Steinhaeusler <franz.steinhaeusler@gmx.at> wrote:
On Sat, 22 Mar 2008 15:30:41 -0700, Robin Dunn <robin@alldunn.com> wrote:
I finally successfully compiled wxwidgets and wxpyhton from trunk svn,
but no SetMark is working.
(gtk2)
Could gtk be the reason?
Did you try it like I did in the screen shot where you interactively do
it from a PyShell, or did you try it in a real program? If the former
then it may have just been a fluke of my current theme that allowed the
selection to be seen when another window had the focus. I wasn't
expecting it to work that way.
I finally successfully compiled wxwidgets and wxpyhton from trunk
svn, but no SetMark is working.
(gtk2)
Could gtk be the reason?
Did you try it like I did in the screen shot where you interactively
do it from a PyShell, or did you try it in a real program? If the
former then it may have just been a fluke of my current theme that
allowed the selection to be seen when another window had the focus. I
wasn't expecting it to work that way.
Strange. I tried it after your screenshot. Very good tool this
inspector, anyway. I tried it also with the sample alone, with .SetMark
and wx.CallAfter (SetMark, x, y). None of that things worked.
Anyway, in the demo, after starting the combobox sample, the whole Text
in the combobox is selected. But then, I didn't got it to show the
SetMark Selection. Also I'm not 100% sure, but after call SetMark(4,7)
afterwards (no selection was shown)I called GetMark and it outputs
(7,7).
The initial select-all when it gets the focus may be getting in your
way. IIRC it happens after the EVT_SET_FOCUS event happens, so you need
to get a little tricky to make it work if you want to set some other
selection upon focus because the wx.CallAfter happens too soon. Try
doing it with a short timer instead.
On Wed, 02 Apr 2008 12:43:10 -0500, Mike Driscoll <mdriscoll@co.marshall.ia.us> wrote:
[...]
Hello, you meant future call? Hm it doesn't work
Here my small sample app:
I think Robin was referring to a wx.Timer instance. You can use a timer
to call a function every few seconds or just once after a specified
amount of time has elapsed.