Click here to Skip to main content
15,891,253 members
Home / Discussions / C#
   

C#

 
GeneralRe: Different ways to persist/share temporary data across classes in a multi-tier WinForm Application? Pin
DaMagicMaster7-Feb-05 12:50
DaMagicMaster7-Feb-05 12:50 
GeneralRe: Different ways to persist/share temporary data across classes in a multi-tier WinForm Application? Pin
Heath Stewart7-Feb-05 15:39
protectorHeath Stewart7-Feb-05 15:39 
GeneralDelete XmlNode Pin
John L. DeVito5-Feb-05 19:31
professionalJohn L. DeVito5-Feb-05 19:31 
GeneralRe: Delete XmlNode Pin
Stefan Troschuetz5-Feb-05 21:07
Stefan Troschuetz5-Feb-05 21:07 
GeneralRe: Delete XmlNode Pin
Heath Stewart6-Feb-05 6:33
protectorHeath Stewart6-Feb-05 6:33 
GeneralRe: Delete XmlNode Pin
John L. DeVito8-Feb-05 12:01
professionalJohn L. DeVito8-Feb-05 12:01 
Questionhow to make what SelectionIndent does in tabs Pin
ektoras5-Feb-05 13:46
ektoras5-Feb-05 13:46 
AnswerRe: how to make what SelectionIndent does in tabs Pin
Heath Stewart6-Feb-05 6:29
protectorHeath Stewart6-Feb-05 6:29 
Tabs are characters. If you need to set a "tab" as Word denotes it, the RichTextBox.SelectIndent is the correct way. This changes the indentation of a paragraph but does not use a tab character, for changes in that paragraph would require a fairly complex algorithm to go and reposition tab characters.

What you should do is get the Font of the currently selected paragraph (using RichTextBox.SelectionFont), the do something like this:
Graphics g = CreateGraphics();
SizeF size = g.MeasureString("\t", richTextBox1.SelectionFont);
int indentation = (int)size.Width;
richTextBox1.SelectionIndent = indentation;


This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: how to make what SelectionIndent does in tabs Pin
ektoras14-Feb-05 0:59
ektoras14-Feb-05 0:59 
GeneralDifferent font colors in textbox Pin
MG00c2x5-Feb-05 11:47
MG00c2x5-Feb-05 11:47 
GeneralRe: Different font colors in textbox Pin
mav.northwind6-Feb-05 3:56
mav.northwind6-Feb-05 3:56 
GeneralRe: Different font colors in textbox Pin
sugunet7-Feb-05 1:38
sugunet7-Feb-05 1:38 
Generalnew line in string Pin
Majid Shahabfar5-Feb-05 10:29
Majid Shahabfar5-Feb-05 10:29 
GeneralRe: new line in string Pin
Beringer5-Feb-05 11:58
Beringer5-Feb-05 11:58 
GeneralRe: new line in string Pin
MG00c2x5-Feb-05 12:03
MG00c2x5-Feb-05 12:03 
GeneralRe: new line in string Pin
S. Senthil Kumar5-Feb-05 16:06
S. Senthil Kumar5-Feb-05 16:06 
GeneralRe: new line in string Pin
Majid Shahabfar6-Feb-05 6:07
Majid Shahabfar6-Feb-05 6:07 
GeneralRe: new line in string Pin
Jon Sagara5-Feb-05 18:52
Jon Sagara5-Feb-05 18:52 
GeneralRe: new line in string Pin
sugunet6-Feb-05 0:55
sugunet6-Feb-05 0:55 
GeneralRe: new line in string Pin
Majid Shahabfar6-Feb-05 6:05
Majid Shahabfar6-Feb-05 6:05 
GeneralRe: new line in string Pin
mav.northwind6-Feb-05 3:17
mav.northwind6-Feb-05 3:17 
GeneralRe: new line in string Pin
Majid Shahabfar6-Feb-05 6:03
Majid Shahabfar6-Feb-05 6:03 
GeneralRe: new line in string Pin
Luis Alonso Ramos6-Feb-05 7:29
Luis Alonso Ramos6-Feb-05 7:29 
GeneralRe: new line in string Pin
mav.northwind6-Feb-05 7:39
mav.northwind6-Feb-05 7:39 
GeneralWeb form from click event Pin
brian555-Feb-05 9:37
brian555-Feb-05 9:37 

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.