unwanted cursor blink

50 views
Skip to first unread message

Mark

unread,
Jun 6, 2023, 4:17:04 AMJun 6
to
My understanding was that Tcl/Tk >=8.7 would respect the users cursor blinking preferences.
But running this program (with or without the `option add` line) has an entry (presumably a ttk::entry) with a blinking cursor:

#!/usr/bin/env wish
option add *insertOffTime 0
set filename [tk_getOpenFile]
puts $filename
exit

Although the vast majority of people find blinking cursors useful, a tiny minority (which is still a lot of people), including me, I can't work blinking cursors. See for example, https://jurta.org/en/prog/noblink

Harald Oehlmann

unread,
Jun 6, 2023, 6:22:05 AMJun 6
to
Hi Mark,
thank you for the post. Could you give more details:
- platform / Window manager if on Linux
- TCL version
- tk version

Thank you,
Harald

Mark

unread,
Jun 6, 2023, 6:43:37 AMJun 6
to
Hi Harald,

I tried with:
Tcl v8.6.11/Tk v8.6 on
Linux 5.10.0-19-amd64 x86_64

and with:
Tcl v8.7a5/Tk v8.7 on
Linux 5.10.0-19-amd64 x86_64

Xfce 4.16 on Debian 11.

Paul Obermeier

unread,
Jun 6, 2023, 8:56:13 AMJun 6
to
Am 06.06.2023 um 10:17 schrieb Mark:
The option insertOffTime only works with "standard" Tk widgets, but not with ttk widgets:

package require Tk

option add *insertOffTime 0

ttk::entry .e1
pack .e1 -expand true -fill both
.e1 insert end "ttk::entry is blinking"

entry .e2
pack .e2 -expand true -fill both
.e2 insert end "entry is not blinking"

Don't know, if blinking can be specified using ttk:styles.

Paul

Mark

unread,
Jun 6, 2023, 11:03:19 AMJun 6
to
Hi Paul,

Yes I knew that insertOffTime only applied to non-styled widgets. But I _thought_ that the ttk widgets were going to respect the user's blinking preferences. See https://core.tcl-lang.org/tk/tktedit/3531366fffffffffffffffffffffffffffffffff

Mark

unread,
Jun 6, 2023, 2:21:25 PMJun 6
to
It now appears that the patches to respect cursor blink from the above ticket have not been applied and maybe won't be. So I'm stuck with using the non-ttk widgets for any that have blinking cursors. Gtk, Qt, and FLTK all support switching off cursor blink: as does Windows since 2000, so clearly _some_ people need this functionality...
Reply all
Reply to author
Forward
0 new messages