Click here to Skip to main content
15,892,768 members
Home / Discussions / C#
   

C#

 
GeneralRe: Trouble in byte\string coding Pin
NaNg1524114-May-06 6:31
NaNg1524114-May-06 6:31 
GeneralRe: Trouble in byte\string coding Pin
NaNg1524114-May-06 6:42
NaNg1524114-May-06 6:42 
QuestionRe: Trouble in byte\string coding Pin
NaNg1524114-May-06 6:50
NaNg1524114-May-06 6:50 
AnswerRe: Trouble in byte\string coding Pin
Guffa14-May-06 7:08
Guffa14-May-06 7:08 
GeneralRe: Trouble in byte\string coding Pin
NaNg1524114-May-06 7:12
NaNg1524114-May-06 7:12 
AnswerRe: Trouble in byte\string coding Pin
Guffa14-May-06 22:17
Guffa14-May-06 22:17 
QuestionRichTextBox questions? Pin
Cristoff14-May-06 5:27
Cristoff14-May-06 5:27 
AnswerRe: RichTextBox questions? Pin
Ed.Poore14-May-06 6:17
Ed.Poore14-May-06 6:17 
Cristoff wrote:
1. How do I determine on which row/line/ is the cursor?


GetCharIndexFromPosition will accept some coordinates and return the index of the character under that point. GetLineFromCharIndex will get the line from the character index.

(Try consulting the help documentation or even just looking through the intellisense, the method names are quite simple Roll eyes | :rolleyes: )

Cristoff wrote:
2. How can I set a background color of a line?


Unless you override the painting of the control there is no built-in way to do this. Take a look at some of the articles regarding the RichTextBox here on CP for ideas on how to do this. (There is one I remember that draws the line numbers, should be quite simple to re-write this to background fill the lines).


You know you're a Land Rover owner when the best route from point A to point B is through the mud.

Ed
GeneralRe: RichTextBox questions? Pin
Cristoff14-May-06 9:20
Cristoff14-May-06 9:20 
GeneralRe: RichTextBox questions? Pin
Ed.Poore14-May-06 9:45
Ed.Poore14-May-06 9:45 
GeneralRe: RichTextBox questions? Pin
Cristoff14-May-06 10:12
Cristoff14-May-06 10:12 
QuestionArraySort Pin
zhujp9814-May-06 5:08
zhujp9814-May-06 5:08 
AnswerRe: ArraySort Pin
Josh Smith14-May-06 5:19
Josh Smith14-May-06 5:19 
AnswerRe: ArraySort Pin
Rei Miyasaka14-May-06 10:42
Rei Miyasaka14-May-06 10:42 
Questionsimple sorting of Arraylist ? Pin
kumar.bs14-May-06 3:54
kumar.bs14-May-06 3:54 
AnswerRe: simple sorting of Arraylist ? Pin
Robert Rohde14-May-06 3:56
Robert Rohde14-May-06 3:56 
QuestionStrange Socket behaviour on Shutdown Pin
Pixinger7714-May-06 3:48
Pixinger7714-May-06 3:48 
QuestionTooltips for disabled buttons Pin
Sayan00714-May-06 3:18
Sayan00714-May-06 3:18 
AnswerRe: Tooltips for diabled buttons Pin
Robert Rohde14-May-06 3:57
Robert Rohde14-May-06 3:57 
AnswerRe: Tooltips for disabled buttons Pin
mav.northwind14-May-06 10:05
mav.northwind14-May-06 10:05 
AnswerRe: Tooltips for disabled buttons Pin
Colin Angus Mackay14-May-06 12:14
Colin Angus Mackay14-May-06 12:14 
QuestionBuilding Regular Expressions Pin
jorgearmindo14-May-06 0:33
jorgearmindo14-May-06 0:33 
AnswerRe: Building Regular Expressions Pin
User 665814-May-06 4:17
User 665814-May-06 4:17 
Questionget from DB to combobox Pin
moranhaim14-May-06 0:26
moranhaim14-May-06 0:26 
AnswerRe: get from DB to combobox Pin
NaNg1524114-May-06 1:19
NaNg1524114-May-06 1:19 

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.