Click here to Skip to main content
15,905,914 members
Home / Discussions / C#
   

C#

 
AnswerRe: Unique value generation? Pin
GregD29-Apr-07 1:59
GregD29-Apr-07 1:59 
QuestionRTB nuances Pin
Mike Hankey27-Apr-07 1:09
mveMike Hankey27-Apr-07 1:09 
Hello all,

I'm trying to add line numbers to a RTB by wrapping the RTB in a UserControl.
I move the RTB to the right to allow room for line numbers which I draw in the exposed UserControl area at the left margin. I have a property which allows me to get/set Fonts to be used for Text and Line numbers but when I do a pe.Graphics.MeasureString the numbers in the UserControl and the text don't match up for some reason?

//Code to draw line numbers in exposed UserCOntrol area
SizeF szLN = pe.Graphics.MeasureString(strLineNum, textFont);
int ln = firstVisibleLine + 1;

for (int i = 0;
(i <= lastVisibleLine) && (ln <= richTextBox1.Lines.Length);
i++)
{
pe.Graphics.DrawString(ln.ToString(), textFont, sb, pt);
pt.Y += szLN.Height;
++ln;
}

Any help on this and any other nuances with the RTB control would be of great help.

Thanks,
Mike


Theres light at the end of the tunnel. Lord I hope it ain't no train!

AnswerRe: RTB nuances Pin
Arun.Immanuel27-Apr-07 1:33
Arun.Immanuel27-Apr-07 1:33 
GeneralRe: RTB nuances Pin
Mike Hankey27-Apr-07 7:06
mveMike Hankey27-Apr-07 7:06 
Questionformula for a crystal report Pin
rkherath27-Apr-07 0:44
rkherath27-Apr-07 0:44 
GeneralUgly Mess with Data Source Pin
Brady Kelly27-Apr-07 0:17
Brady Kelly27-Apr-07 0:17 
QuestionMacro to insert File header and function header in C# Pin
jayart27-Apr-07 0:09
jayart27-Apr-07 0:09 
AnswerRe: Macro to insert File header and function header in C# Pin
Christian Graus27-Apr-07 0:36
protectorChristian Graus27-Apr-07 0:36 
GeneralRe: Macro to insert File header and function header in C# Pin
jayart27-Apr-07 2:27
jayart27-Apr-07 2:27 
GeneralRe: Macro to insert File header and function header in C# Pin
Kevin McFarlane27-Apr-07 3:12
Kevin McFarlane27-Apr-07 3:12 
QuestionPlzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
EEmaan27-Apr-07 0:09
EEmaan27-Apr-07 0:09 
AnswerRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
Christian Graus27-Apr-07 0:40
protectorChristian Graus27-Apr-07 0:40 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
EEmaan27-Apr-07 0:48
EEmaan27-Apr-07 0:48 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
Arun.Immanuel27-Apr-07 1:22
Arun.Immanuel27-Apr-07 1:22 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
Christian Graus27-Apr-07 1:30
protectorChristian Graus27-Apr-07 1:30 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
Christian Graus27-Apr-07 1:23
protectorChristian Graus27-Apr-07 1:23 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
EEmaan27-Apr-07 1:39
EEmaan27-Apr-07 1:39 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
Christian Graus27-Apr-07 1:50
protectorChristian Graus27-Apr-07 1:50 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
ChandraRam27-Apr-07 2:57
ChandraRam27-Apr-07 2:57 
Questionuse of assigning the object impelementing a interface to an interface [modified] Pin
sishya26-Apr-07 23:45
sishya26-Apr-07 23:45 
AnswerRe: use of assigning the object impelementing a interface to an interface Pin
Christian Graus27-Apr-07 0:02
protectorChristian Graus27-Apr-07 0:02 
AnswerRe: use of assigning the object impelementing a interface to an interface Pin
GregD29-Apr-07 2:08
GregD29-Apr-07 2:08 
QuestionWebbased SQL Query Analyzer? Pin
Succodimele26-Apr-07 23:37
Succodimele26-Apr-07 23:37 
AnswerRe: Webbased SQL Query Analyzer? Pin
Christian Graus26-Apr-07 23:47
protectorChristian Graus26-Apr-07 23:47 
GeneralRe: Webbased SQL Query Analyzer? Pin
Succodimele26-Apr-07 23:56
Succodimele26-Apr-07 23:56 

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.