첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
유용한 소스 코드가 있으면 icodebroker@naver.com으로 보내주시면 감사합니다.
블로그 자료는 자유롭게 사용하세요.

■ 셀 내용 정렬하기

----------------------------------------------------------------------------------------------------

 

fpSpread1.Sheets[0].Cells[0, 0].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;

fpSpread1.Sheets[0].Cells[0, 0].VerticalAlignment   = FarPoint.Win.Spread.CellVerticalAlignment.Bottom;

 

fpSpread1.Sheets[0].Cells[1, 1, 2, 2].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;

fpSpread1.Sheets[0].Cells[1, 1, 2, 2].VerticalAlignment   = FarPoint.Win.Spread.CellVerticalAlignment.Center;

 

또는

 

FarPoint.Win.Spread.Cell a1Cell;

 

a1Cell = fpSpread1.ActiveSheet.Cells[0, 0];

 

a1Cell.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;

a1Cell.VerticalAlignment   = FarPoint.Win.Spread.CellVerticalAlignment.Bottom;

 

FarPoint.Win.Spread.Cell rangeCell;

 

rangeCell = fpSpread1.ActiveSheet.Cells[1,1,2,2];

 

rangeCell.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;

rangeCell.VerticalAlignment   = FarPoint.Win.Spread.CellVerticalAlignment.Center;

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요