Discussion:
[groovy-user] how to put background color in tablelayout?
John Sanabria
2007-11-08 04:22:10 UTC
Permalink
hi,

I'm using tablelayout for my front-end application using SwingBuilder.

In a given row, I define something like that:

tr {
td {
button('hey')
}
td {
button('you')
}
}

Visually, there are a space between the two buttons filled with gray
color, but the rest of my GUI has the color white as background.

How I can put color white as background in that row?

Thanks a lot,

PD: I try with

- tr(background: Color.WHITE)
- tr(bgcolor: Color.WHITE)

I'm need to deliver a snapshot of my application tomorrow :(

---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email
Danno Ferrin
2007-11-08 16:55:04 UTC
Permalink
TableLayout is kind of a red-headed step child, not much has been done to
improve it since Groovy 1.0, it the only used of the ComponentFacade support
in SwingBuilder.Got to do some silly hacking...

tableLayout(id:'table') {
table.component.background = Color.BLUE
tr {
td {
button('hey', background:Color.BLUE)
}
td {
button('you', , background:Color.BLUE)
}
}
}

The background: on the buttons are needed for Windows XP and Vista L&F. The
real one is the ID on the tableLayout and the next line
table.component.background

--Danno
Post by John Sanabria
hi,
I'm using tablelayout for my front-end application using SwingBuilder.
tr {
td {
button('hey')
}
td {
button('you')
}
}
Visually, there are a space between the two buttons filled with gray
color, but the rest of my GUI has the color white as background.
How I can put color white as background in that row?
Thanks a lot,
PD: I try with
- tr(background: Color.WHITE)
- tr(bgcolor: Color.WHITE)
I'm need to deliver a snapshot of my application tomorrow :(
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Loading...