Code: Select all
With frmMain.TChart1
.Top = frmMain.iGrid1.Top + frmMain.iGrid1.Height
.Left = 0
.Height = frmMain.MultiPage1.Height - frmMain.iGrid1.Height - frmMain.iGrid2.Height - frmMain.TChart2.Height
.Width = frmMain.FrameHomeRibbon.Width * 0.28
End With
When setting the Height property, it's not working. If I assign the right side of the equation to a variable (so I can see what the value is), I get, say, 100. But after I assign it to the Height property, the Height property is a different number, say 50.
iVariable = frmMain.MultiPage1.Height - frmMain.iGrid1.Height - frmMain.iGrid2.Height - frmMain.TChart2.Height
.Height = iVariable
Either way, the Height property is not being set correctly. It's like it ignores the right side of the equation - or at least comes up with a seemingly random number.
I've done the math on a piece of paper, and I am confident that I should have (using my fake numbers above) 100 pixels which validates the right side of the equation.
Not sure if it matters, but there are three charts on the same page of the multipage control, all at the same .Top and all the same .Width.
I am using TChart Pro V2021.0.2.10
What am I missing?
Thanks.