C
crferguson
Hello all!
I've run myself into a wall on something that sounds like it should be
simple. I'm building a table control dynamically and want to add a
string of text followed by an imagebutton control. I'm able to do this
in individual cells, but I really need it in one cell. I'm wanting to
add the string of text to the cell followed by a space and then the
imagebutton control. For instance, the result in the cell would be
something like "My Name [imagebutton]"
I can do this without a problem manually in a form by adding a table
and then both the text and button in a cell. But I can't figure out
how to do it dynamically. The code I've been working with goes
something like this:
=======================
dim t as table, tr as tablerow, tc as tablecell, ib as iamgebutton
dim strText as string = "Some Text"
t = new table
tr = new tablerow
tc = new tablecell
ib = new imagebutton
tc.text = strText & " "
tc.controls.add(ib)
tr.cells.add(tc)
t.rows.add(tr)
======================
Doing the above displays the imagebutton in the cell, but not the text.
I've run myself into a wall on something that sounds like it should be
simple. I'm building a table control dynamically and want to add a
string of text followed by an imagebutton control. I'm able to do this
in individual cells, but I really need it in one cell. I'm wanting to
add the string of text to the cell followed by a space and then the
imagebutton control. For instance, the result in the cell would be
something like "My Name [imagebutton]"
I can do this without a problem manually in a form by adding a table
and then both the text and button in a cell. But I can't figure out
how to do it dynamically. The code I've been working with goes
something like this:
=======================
dim t as table, tr as tablerow, tc as tablecell, ib as iamgebutton
dim strText as string = "Some Text"
t = new table
tr = new tablerow
tc = new tablecell
ib = new imagebutton
tc.text = strText & " "
tc.controls.add(ib)
tr.cells.add(tc)
t.rows.add(tr)
======================
Doing the above displays the imagebutton in the cell, but not the text.