
CANCEL BUTTON private void button2_Click( object sender, EventArgs e) ADD FILENAME CHECKBOX HANDLER private void cbAddFileName_CheckedChanged( object sender, EventArgs e) DATE TIME CHECKBOX HANDLER private void cbAddDateToHeader_CheckedChanged( object sender, EventArgs e) PAGE NUMBER BUTTON CHECK CHANGED HANDLER private void cbPageNumbersOn_CheckedChanged( object sender, EventArgs e) Private void label3_Click( object sender, EventArgs e) SELECT FONT BUTTON private void button4_Click( object sender, EventArgs e)Įht.GeneralExceptionHandler( " Invalid Font Selection", HEADER TEXT BOX HANDLER private void tbHeaderText_TextChanged( object sender, EventArgs e) HEADER ON BUTTON CHECK CHANGED private void rbHeaderOn_CheckedChanged( object sender, EventArgs e) SET MARGINS TO 1" ALL AROUND private void btnOneInch_Click( object sender, EventArgs e) SET MARGINS TO 0 private void button3_Click( object sender, EventArgs e) " Either set the margins to values greaterĮht.GeneralExceptionHandler( " Header will not print if margins are set to 0", If ((top = 0 || bottom = 0 || left = 0 || right = 0) & headeron)Įxception ex = new Exception( " (Application) - You must set the margins Right = ( float)Convert.ToDouble(tbRight.Text) Įht.GeneralExceptionHandler( " Enter Margins as 3 digit decimals", Left = ( float)Convert.ToDouble(tbLeft.Text) Top = ( float)Convert.ToDouble(tbTop.Text) īottom = ( float)Convert.ToDouble(tbBottom.Text) OK Button private void button1_Click( object sender, EventArgs e) Private string headerstring = string.Empty ĮxceptionHandlerTools eht = new ExceptionHandlerTools() Private string documentfilename = string.Empty Private bool addfilenametoheader = false Private Font headerfont = new Font( " Arial", 10) // DEFAULT private bool headeron = false PRIVATE VARIABLES private float top, bottom, left, right = 0. This.addfilenametoheader = addfilenametoheader


OVERRIDE 2 public marginsForm( float Top, float Bottom, float Left, float Right,īool landscapemodeon, string headerstring,Font headerfont, bool headeron, bool numberpages,īool adddatetoheader, bool addfilenametoheader) OVERRIDE 1 public marginsForm( float Top, float Bottom, float Left, float Right, bool landscapemodeon) To set the actual Margins, Header and Footer for the printed page, using the GeneralPrintForm from the PrintHelper Class in Item 1 above, a object is filled in and sent to the GeneralPrintForm via its constructor: Note that this only simulates the margins of the printed page. The easy way to solve this is enclose RTB in a slightly larger Panel container with a FixedSingle BorderStyle, so there is an apparent margin between the scrolling text in the control and the surrounding edges of the panel.

I created a PrintHelper class with a GeneralPrintForm constructor, available as a separate " Tips & Tricks" post here: ".
SWIFT LATEX TEXT EDITOR FULL
While the RTB has many useful properties and methods, it is not a full featured editor in its basic form.

This project began as an effort to make the base RichTextBox class into a more full featured editor that could serve as a reusable component for other applications I was developing. However, in its basic form, it lacks the features of a more complete editor, such as Find and Replace, document printing, page layout, and file and image drag and drop. The RichTextBox control (RTB) in the NET Framework offers a simple way to edit richtext markup code, used in RTF files and older MS-Word documents, as well as simple text, in a WYSIWYG manner.
