Replies: 2 comments
-
What you're doing here is moving the cursor to row=1, column=82 and printing. But the Panel is made of multiple lines, so the first line will be printed at row=1, column=82, but the second line will be printed at row=2, column=1, causing the offset. One solution is to define a function that prints each line at the right position: using Term
function printat(obj, row, col)
for (i, line) in enumerate(split(string(obj), "\n"))
print("\e[$(row+i-1);$(col)H", line)
end
end
printat(Panel(), 20, 50) |
Beta Was this translation helpful? Give feedback.
0 replies
-
That works, thank you, hope I'm closing this discussion correctly... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am new to julia and have never programmed in Python. I am using Ubuntu Linux in a Oracle VM Box on Windows 11. I am using PuTTY to access the VM set to xterm with a 30x100 screen. I want to position my box in the upper right corner of the screen. When I use the xterm positioning commands the box starts there but finishes on the left. Can't seem to find anything in the documentation or other discussions on how to do this, i.e.
julia> print("\e[1;82H" * Panel("this is {red}RED{/red}"; fit=true, box=:SQUARE))
Beta Was this translation helpful? Give feedback.
All reactions