# Display a string in a given X,Y position

**URL:** <https://www.ruby-forum.com/t/display-a-string-in-a-given-x-y-position/96461>\
**Category:** Ruby\
**Created:** [June 28, 2006, 9:51pm UTC](https://www.ruby-forum.com/t/display-a-string-in-a-given-x-y-position/96461 "2006-06-28T21:51:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 28, 2006, 9:51pm UTC](https://www.ruby-forum.com/t/display-a-string-in-a-given-x-y-position/96461/1 "2006-06-28T21:51:19Z")

</div>

Hi everybody!

Sorry if this question has already been treated, I didn’t succeed in  
finding anything suitable for my needs.

I was trying to display the process of filling a board with given  
patterns on a console.

#######################

# 

# X

# X X

# X

# X X X

# 

# X

# X

#######################  
(Just a stupid example)

I could’nt find anything better than doing :

system(“clear”)  
showBoard

each time I wanted to update the display, even though I only wanted to  
change a single char on the board!  
Is there a way to tell Ruby to display a given string on a given X,Y  
position, without changing anything else?

That would be perfect.

Thanks a lot for your attention,  
(and thanks too for that wonderful programming language),

Eric

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 28, 2006, 9:58pm UTC](https://www.ruby-forum.com/t/display-a-string-in-a-given-x-y-position/96461/2 "2006-06-28T21:58:38Z")

</div>

Have you looked at curses?

[http://ncurses-ruby.berlios.de/](http://ncurses-ruby.berlios.de/)
