Click here to Skip to main content
15,915,093 members
Home / Discussions / C#
   

C#

 
GeneralRe: Delete files Pin
Nish Nishant1-May-02 12:40
sitebuilderNish Nishant1-May-02 12:40 
GeneralRe: Delete files Pin
1-May-02 12:45
suss1-May-02 12:45 
GeneralRe: Delete files Pin
Nish Nishant1-May-02 13:03
sitebuilderNish Nishant1-May-02 13:03 
GeneralRe: Delete files Pin
1-May-02 13:18
suss1-May-02 13:18 
GeneralRe: Delete files Pin
Nish Nishant1-May-02 13:24
sitebuilderNish Nishant1-May-02 13:24 
GeneralMSChart Again Pin
1-May-02 9:46
suss1-May-02 9:46 
QuestionRichTextBox - Making som text bold? Pin
Rickard Andersson201-May-02 9:20
Rickard Andersson201-May-02 9:20 
AnswerRe: RichTextBox - Making som text bold? Pin
Mazdak1-May-02 9:48
Mazdak1-May-02 9:48 
This is my sample code:

C#
private void btnBold_Click(object sender, System.EventArgs e)
{
	Font oldFont;
	Font newFont;
				
	// Get the font that is being used in the selected text
	oldFont = this.rtfText.SelectionFont;

	// If the font is using bold style at the moment, we should remove it
	if (oldFont.Bold)
	       newFont = new Font(oldFont, oldFont.Style & ~FontStyle.Bold);
	else
        	newFont = new Font(oldFont, oldFont.Style | FontStyle.Bold);

	// Insert the new font
	this.rtfText.SelectionFont = newFont;
	this.rtfText.Focus();
}


Mazy

"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd

GeneralRe: RichTextBox - Making som text bold? Pin
Rickard Andersson201-May-02 10:02
Rickard Andersson201-May-02 10:02 
GeneralRe: RichTextBox - Making som text bold? Pin
Rickard Andersson201-May-02 10:07
Rickard Andersson201-May-02 10:07 
GeneralFurther more... Pin
1-May-02 5:27
suss1-May-02 5:27 
GeneralGetting the windows key Pin
DeadWisdom1-May-02 4:32
DeadWisdom1-May-02 4:32 
GeneralRe: Getting the windows key Pin
Nish Nishant1-May-02 12:41
sitebuilderNish Nishant1-May-02 12:41 
QuestionComboBox ReadOnly? Pin
1-May-02 4:30
suss1-May-02 4:30 
AnswerRe: ComboBox ReadOnly? Pin
Sabran1-May-02 7:45
Sabran1-May-02 7:45 
GeneralRe: ComboBox ReadOnly? Pin
Nish Nishant1-May-02 12:44
sitebuilderNish Nishant1-May-02 12:44 
GeneralTreeView Problem Pin
Serge R1-May-02 2:51
Serge R1-May-02 2:51 
GeneralRe: TreeView Problem Pin
James T. Johnson1-May-02 7:19
James T. Johnson1-May-02 7:19 
GeneralRe: TreeView Problem Pin
Serge R1-May-02 7:40
Serge R1-May-02 7:40 
GeneralRe: TreeView Problem Pin
James T. Johnson1-May-02 7:50
James T. Johnson1-May-02 7:50 
GeneralRe: TreeView Problem Pin
Serge R1-May-02 8:02
Serge R1-May-02 8:02 
GeneralRe: TreeView Problem Pin
Neil Van Note1-May-02 7:39
Neil Van Note1-May-02 7:39 
GeneralRe: TreeView Problem Pin
Serge R1-May-02 7:48
Serge R1-May-02 7:48 
GeneralRe: TreeView Problem Pin
1-May-02 12:20
suss1-May-02 12:20 
Question??? Pin
1-May-02 1:28
suss1-May-02 1:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.