public Int32 tabPosition(printHorizontal field) { ISupportsTextCursor target_e = target as ISupportsTextCursor; switch (field) { case printHorizontal.left: return(target.innerLeftPosition); break; case printHorizontal.middle: if (target_e != null) { return(target_e.leftFieldWidth + target.innerLeftPosition); } break; case printHorizontal.right: if (target_e != null) { return(target.innerRightPosition - target_e.rightFieldWidth); } break; } return(0); }
/// <summary> /// Postavlja child objekat na poziciju kursora /// </summary> /// <param name="child"></param> public void placeChild(ISupportsTextCursor child) { child.margin.left = x; child.margin.top = y; Int32 dMLeft = x - child.innerBoxedLeftPosition; Int32 dMTop = y - child.innerBoxedTopPosition; child.width = target.width; // Math.Min(child.width + dMLeft, target.width - x); child.height = target.height; // Math.Min(child.height + dMTop, target.height - y); }