How can I turn off the blinking cursor in a TextAr

2019-08-20 03:58发布

In Perl Tk the trick is that you can set the 'insert on time' of a text widget to 0, which has the effect of turning off the blinking cursor:

$self->{status_line}=$self->{status_frame}->Text(
-width=>80,-font=>[-size=>10],-height=>1,
-insertontime=>0)->pack(-side=>'left');

Is there an equivalent of this in Java to turn off the blinking cursor?

1条回答
贼婆χ
2楼-- · 2019-08-20 04:55

You can do this in CSS with

-fx-display-caret: false ;

either inline:

textArea.setStyle("-fx-display-caret: false;");

or in an external CSS file:

.text-area {
    -fx-display-caret: false ;
}
查看更多
登录 后发表回答