Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have copied some more items from the table box, such as window title, show condition, etc. However, I do not manage to copy the exact same Position (top, left, width, height) of the table box to the new straigt table. Maybe somebody knows how to do so:
'Copy tablebox title
set cp = chart.GetProperties
cp.GraphLayout.WindowTitle.v = tbp.Layout.Frame.Name.v
'Copy the calculation condition
cp.EvaluationCondition.v = tbp.EvaluationCondition.v
'Copy the show condition
cp.GraphLayout.Frame.Show.Always = false
cp.GraphLayout.Frame.Show.Expression.v = tbp.Layout.Frame.Show.Expression.v
'Copy the calculation errors messages
for i = 0 to cp.GraphLayout.ErrorMessageOverrides.Count-1
cp.GraphLayout.ErrorMessageOverrides.Item(i).v = tbp.ErrorMessageOverrides(i).v
next
'Copy position: does not work, new chart does not take exact position of tablebox
'mh dim dummy(0) 'all parts
'mh set fr = chart.GetFrameDef
'mh set pos = fr.Rect
'mh pos.Top = tbp.Layout.Frame.Rect.Top
'mh pos.Left = tbp.Layout.Frame.Rect.Left
'mh pos.Width = tbp.Layout.Frame.Rect.Width
'mh pos.Height = tbp.Layout.Frame.Rect.Height
'mh set pos = fr.MinimizedRect
'mh pos.Top = tbp.Layout.Frame.Rect.Top
'mh pos.Left = tbp.Layout.Frame.Rect.Left
'mh pos.Width = tbp.Layout.Frame.Rect.Width
'mh pos.Height = tbp.Layout.Frame.Rect.Height
'mh chart.SetFrame fr, true, dummy
'Copy position: does not work, new chart does not take exact position of tablebox
pos = chart.GetRect
pos.Top = tb.GetRect.Top
pos.Left = tb.GetRect.Left
pos.Width = tb.GetRect.Width
pos.Height = tb.GetRect.Height
chart.SetRect pos
'Apply table box format to chart format
'Do it manually once new straigt table exists.
chart.SetProperties cp