MoveObject
Bring object to the front or push it to the back etc.
BOOL MoveObject( DWORD dwCntrl, BOOL bUndo = FALSE )
Return TRUE if success, or FALSE if fail.
EX1
BOOL MoveObject_ex1() { Worksheet wks; wks.Create("origin"); Dataset dsX(wks, 0), dsY(wks, 1); vector vv = {0, 1, 2, 3, 4, 5}; dsX = dsY = vv; GraphPage gp; gp.Create("column"); if(gp) { GraphLayer gl = gp.Layers(0); // get the first layer gl.AddPlot(wks, IDM_PLOT_COLUMN); GraphObject go = gl.CreateGraphObject(GROT_TEXT); go.SetName("MyText"); if( go ) { go.Text = "MO_BEHIND_DATA"; go.X = 4; go.Y = 2; go.MoveObject(MO_BEHIND_DATA); } GraphObject go2 = gl.CreateGraphObject(GROT_TEXT); go2.SetName("MyText2"); if( go2 ) { go2.Text = "MO_FRONT_DATA"; go2.X = 4; go2.Y = 1; go2.MoveObject(MO_FRONT_DATA); } } }
origin.h