svoid setCaretPosition(final JTextComponent c, final int pos) { if (c != null) swing { pcall { int _pos = max(0, min(l(c.getText()), pos)); c.setCaretPosition(_pos); } } }
Began life as a copy of #1006445
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1009427 |
Snippet name: | setCaretPosition - wrapper for JTextComponent.setCaretPosition with pcall |
Eternal ID of this version: | #1009427/6 |
Text MD5: | 640d7c896300a76cfc8c1751cb60573f |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-18 17:19:01 |
Source code size: | 202 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 545 / 619 |
Version history: | 5 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1015552 - getCaretPosition |