【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.4.19.8 GraphObjectBase::MoveObject
Contents
Description
Bring object to the front or push it to the back etc.
Syntax
BOOL MoveObject( DWORD dwCntrl, BOOL bUndo = FALSE )
Parameters
- dwCntrl
- [input] Combination of the following bits:
- MO_TOP, bring to the front
- MO_BOTTOM, push to the back
- MO_BEHIND_DATA, make it behind data
- MO_FRONT_DATA, bring to the front of data
- MO_TOGGLE_DATA,
- bUndo
- [input] whether the action should be undoable.
Return
Return TRUE if success, or FALSE if fail.
Examples
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); } } }
Remark
See Also
Header to Include
origin.h