I’m really struggling with the positioning of embedded containers within Web Containers. When I add a container vertically at runtime, the “top” positioning bears no relation to the top value I’m setting. I’ve specified a “top” to which I add the height of the container for stacking vertically in a loop (plus a small spacer). The output bears no relation to the specified position, creating a huge gap between the controls. I’ve used the Style.Value(“top”) method and this positions things as expected, but this creates all sorts of very strange side-effects. Here’s my code.
Var top As integer =2 'First row should, theoretically be near the top?!
Var pRow As DataBar 'My container… Height = 46
For pCount As Integer = 0 to mRows
pRow = new DataBar
pRow.Embedwithin(Me, 6, top, pRow.Width, pRow.Height)
top = top + (pRow.Height + 2)
My other problem is the speed. We do assessments in excel, and I’m trying to replicate our assessment framework in Xojo. We have 120+ lines in each assessment. Just adding the equivalent of one cell per row takes 19 seconds! I will be needing 9 columns, so this will require a lunch break while loading. I can’t help but think that I’m doing something fundamentally wrong? Any help please?