Hi Penn!
Thanks for reply!
You are right, I think its better to use Axis-Object to manage its settings.
But it did not prevent the appearance of the bug. I could figure out, that the bug appears, when
not getting the Format of the Axis-Object before changing settings:
Tree tr1;
tr1 = aY.GetFormat(FPB_ALL, FOB_ALL, TRUE, TRUE);
-> the lines that are commented out in your code.
I implemeted this as a method in one of my classes:
MyClass::ShowAxisBeginEndTickLabel(bool bX, bool bY)
{
Axis aX, aY;
aX = _gl.XAxis;
aY = _gl.YAxis;
if(!aY || !aX)
return;
// Default: show Begin/End Tick-Labels
int nTypeX = 0, nTypeY = 0;
if(!bX)
nTypeX = 3; // dont show
if(!bY)
nTypeY = 3; // dont show
// Format Trees
Tree trX, trY;
trX = aX.GetFormat(FPB_ALL, FOB_ALL, TRUE, TRUE);
trY = aY.GetFormat(FPB_ALL, FOB_ALL, TRUE, TRUE);
// X-Axis settings
trX.Root.Labels.BottomLabels.Custom.Begin.Type.nVal = nTypeX;
trX.Root.Labels.BottomLabels.Custom.Begin.Label.strVal = "";
trX.Root.Labels.BottomLabels.Custom.End.Type.nVal = nTypeX;
trX.Root.Labels.BottomLabels.Custom.End.Label.strVal = "";
// Y-Axis settings
trY.Root.Labels.LeftLabels.Custom.Begin.Type.nVal = nTypeY;
trY.Root.Labels.LeftLabels.Custom.Begin.Label.strVal = "";
trY.Root.Labels.LeftLabels.Custom.End.Type.nVal = nTypeY;
trY.Root.Labels.LeftLabels.Custom.End.Label.strVal = "";
// Update X-Axis
if( 0 == aX.UpdateThemeIDs(trX.Root))
{
bool bRet = aX.ApplyFormat(trX, true, true);
}
// Update Y-Axis
if( 0 == aY.UpdateThemeIDs(trY.Root))
{
bool bRet = aY.ApplyFormat(trY, true, true);
}
// Refresh Page
_gl.GetPage().Refresh(true);
}
Works fine now. Thanks again for help!
|-- TreeNode
...|-- a??
...|-- ha!!