Click here to Skip to main content
15,911,030 members
Home / Discussions / C#
   

C#

 
GeneralRe: Java class to C#: inheritance problem Pin
Richard Deeming15-May-03 8:23
mveRichard Deeming15-May-03 8:23 
GeneralRe: Java class to C#: inheritance problem Pin
Philip Fitzsimons16-May-03 2:39
Philip Fitzsimons16-May-03 2:39 
GeneralRe: Java class to C#: inheritance problem Pin
Richard Deeming15-May-03 8:21
mveRichard Deeming15-May-03 8:21 
GeneralRe: Java class to C#: inheritance problem Pin
cabo15-May-03 9:32
cabo15-May-03 9:32 
Generalreqaurding rtf boxes Pin
jtmtv1814-May-03 22:57
jtmtv1814-May-03 22:57 
GeneralRe: reqaurding rtf boxes Pin
KingTermite15-May-03 3:35
KingTermite15-May-03 3:35 
GeneralRe: reqaurding rtf boxes Pin
jtmtv1815-May-03 10:11
jtmtv1815-May-03 10:11 
GeneralRe: reqaurding rtf boxes Pin
KingTermite16-May-03 2:41
KingTermite16-May-03 2:41 
Here is some code I used for my latest project where I had to do something similar.

----------------
<br />
int iIndex = 0;<br />
<br />
while ( iIndex < (oBox.TextLength) )<br />
{<br />
<br />
// Go one char at a time<br />
oBox.Select(iIndex,1);  // ** oBox is the RichTextBox<br />
<br />
if (null != oBox.SelectionFont)<br />
{<br />
  iSelectedCharTextSize <br />
      = getTextSizeFromFont(oBox.SelectionFont);<br />
}<br />
<br />
if (true != oBox.SelectionColor.IsEmpty)<br />
{<br />
  strSelectedCharColor <br />
     = getHexColorString(oBox.SelectionColor);<br />
}<br />

--------------

You see, though, I went through the whole box from the beginning...not just using what was selected. So you will probably have to find the beginning index based on what is selected. I wouldn't think it would be that hard.

good luck.

chris



There are only 10 types of people in this world....those that understand binary, and those that do not.
GeneralRe: reqaurding rtf boxes Pin
jtmtv1816-May-03 8:19
jtmtv1816-May-03 8:19 
GeneralRe: reqaurding rtf boxes Pin
KingTermite16-May-03 12:59
KingTermite16-May-03 12:59 
GeneralRe: reqaurding rtf boxes Pin
jtmtv1816-May-03 14:00
jtmtv1816-May-03 14:00 
GeneralHiWord/LoWord/etc in C# Pin
J. Dunlap14-May-03 19:33
J. Dunlap14-May-03 19:33 
GeneralRe: HiWord/LoWord/etc in C# Pin
cdehelean15-May-03 4:49
cdehelean15-May-03 4:49 
GeneralRe: HiWord/LoWord/etc in C# Pin
J. Dunlap15-May-03 7:37
J. Dunlap15-May-03 7:37 
GeneralHandling ActiveX control events in .Net Pin
Anonymous14-May-03 18:21
Anonymous14-May-03 18:21 
QuestionEquiv of DrawState() API in .NET? Pin
J. Dunlap14-May-03 12:21
J. Dunlap14-May-03 12:21 
AnswerRe: Equiv of DrawState() API in .NET? Pin
James T. Johnson14-May-03 14:06
James T. Johnson14-May-03 14:06 
GeneralRe: Equiv of DrawState() API in .NET? Pin
J. Dunlap14-May-03 14:12
J. Dunlap14-May-03 14:12 
GeneralRe: Equiv of DrawState() API in .NET? Pin
James T. Johnson14-May-03 14:16
James T. Johnson14-May-03 14:16 
GeneralRe: Equiv of DrawState() API in .NET? Pin
J. Dunlap14-May-03 14:42
J. Dunlap14-May-03 14:42 
GeneralRe: Equiv of DrawState() API in .NET? Pin
J. Dunlap14-May-03 20:37
J. Dunlap14-May-03 20:37 
GeneralPlease, tell me WebServices are not stupid! Pin
Daniel Turini14-May-03 11:28
Daniel Turini14-May-03 11:28 
GeneralRe: Please, tell me WebServices are not stupid! Pin
leppie14-May-03 12:15
leppie14-May-03 12:15 
GeneralRe: Please, tell me WebServices are not stupid! Pin
James T. Johnson14-May-03 13:53
James T. Johnson14-May-03 13:53 
GeneralPass byte[] -> struct Pin
Wizard_0114-May-03 10:33
Wizard_0114-May-03 10:33 

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.