winformtextbox에 글꼴 크기 증가 또는 감소

   private void btnAddFont_Click(object sender, EventArgs e)
        {
            float fSize = this.txtResult.Font.Size;
           
            if (fSize > 22.0) { return; }

            fSize = fSize + 1;
            txtResult.Font = new Font(txtResult.Font.FontFamily, fSize, txtResult.Font.Style);
        }

        private void btnSubtractFont_Click(object sender, EventArgs e)
        {
            float fSize = this.txtResult.Font.Size;

            if (fSize <6.0) { return; }

            fSize = fSize - 1;
            txtResult.Font = new Font(txtResult.Font.FontFamily, fSize, txtResult.Font.Style);
        }

좋은 웹페이지 즐겨찾기