# A grid without row labels?

**URL:** <https://www.ruby-forum.com/t/a-grid-without-row-labels/153092>\
**Category:** wxRuby\
**Created:** [November 12, 2008, 1:31am UTC](https://www.ruby-forum.com/t/a-grid-without-row-labels/153092 "2008-11-12T01:31:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f17d59/32.png) [@ramo](https://www.ruby-forum.com/u/ramo)\
**Post date:** [November 12, 2008, 1:31am UTC](https://www.ruby-forum.com/t/a-grid-without-row-labels/153092/1 "2008-11-12T01:31:36Z")

</div>

Hello there

I’m working on a grid of many rows and one column  
For example: if I want to show the name of the states, I only need their  
names and nothing more, so the grid will be a many rows(number of  
states) and one column(name).

The point is that I dont want the lavels of the rows on my left, I only  
want the cell but no row names. I don’t know if i’m explaining myself so  
i’ll paste some images (from google)

this is the grid with both row and column lavels:  
[![](https://phenix.developpez.com/Tutoriel_wxWindows/Tutoriel%20WxWindows_8_clip_image013.jpg) ](https://phenix.developpez.com/Tutoriel_wxWindows/Tutoriel%20WxWindows_8_clip_image013.jpg)

end this is a grid with only the column lavel (no row lavels):  
[http://www.gnuenterprise.org/~johannes/zipgrid-gtk.png](http://www.gnuenterprise.org/~johannes/zipgrid-gtk.png)

i hope you can help me and i’m sorry for troubling you every time

---

<div class="post-metadata">

**Author:** ![ramo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f17d59/32.png) [@ramo](https://www.ruby-forum.com/u/ramo)\
**Post date:** [November 12, 2008, 1:41am UTC](https://www.ruby-forum.com/t/a-grid-without-row-labels/153092/2 "2008-11-12T01:41:11Z")

</div>

Hi Omar

Omar H. wrote:

> I’m working on a grid of many rows and one column  
> For example: if I want to show the name of the states, I only need their  
> names and nothing more, so the grid will be a many rows(number of  
> states) and one column(name).
> 
> The point is that I dont want the lavels of the rows on my left, I only  
> want the cell but no row names.

Simply, with a Wx::Grid

grid.set\_row\_label\_size( 0 ) # or  
grid.row\_label\_size = 0

But I wonder if Wx::Grid is the best control for this. Have you looked  
into Wx::ListCtrl (especially with the Wx::LC\_REPORT style)? It will  
display a list of items with multiple text columns per item.

a

---

<div class="post-metadata">

**Author:** ![ramo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f17d59/32.png) [@ramo](https://www.ruby-forum.com/u/ramo)\
**Post date:** [November 12, 2008, 10:39pm UTC](https://www.ruby-forum.com/t/a-grid-without-row-labels/153092/3 "2008-11-12T22:39:25Z")

</div>

Hi there

> Simply, with a Wx::Grid
> 
> grid.set\_row\_label\_size( 0 ) # or  
> grid.row\_label\_size = 0

Thanks! it’s working fine, you saved me again
