Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I add a row/col to the grid?

col Grid row
0
Posted

How can I add a row/col to the grid?

0

# insert rows or columns into a grid # grid: the geometry master # what: row or column # index: where to insert # count: how many rows/cols to insert proc grid_insert {grid what index {count 1}} { foreach slave [grid slaves $grid] { array set info [grid info $slave] if {$info(-$what) >= $index} { incr info(-$what) $count eval {grid $slave} [array get info] } elseif {$info(-$what)+$info(-${what}span) > $index} { incr info(-${what}span) $count eval {grid $slave} [array get info] } } }

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123