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

C#

 
GeneralRe: replace Pin
mav.northwind1-Feb-06 22:40
mav.northwind1-Feb-06 22:40 
Question.Z library? Pin
Howard Richards1-Feb-06 5:58
Howard Richards1-Feb-06 5:58 
QuestionRichTextBox and hidden Text Pin
Beringer1-Feb-06 5:51
Beringer1-Feb-06 5:51 
AnswerRe: RichTextBox and hidden Text Pin
Beringer1-Feb-06 7:52
Beringer1-Feb-06 7:52 
GeneralRe: RichTextBox and hidden Text Pin
Beringer1-Feb-06 8:00
Beringer1-Feb-06 8:00 
GeneralRe: RichTextBox and hidden Text Pin
mav.northwind1-Feb-06 9:39
mav.northwind1-Feb-06 9:39 
GeneralRe: RichTextBox and hidden Text Pin
Beringer1-Feb-06 11:08
Beringer1-Feb-06 11:08 
GeneralRe: RichTextBox and hidden Text Pin
mav.northwind1-Feb-06 22:53
mav.northwind1-Feb-06 22:53 
I just tried it.
Created a RTB and then wrote:
richTextBox1.Text = "test";
richTextBox1.Select(2,0); // cursor between 'e' and 's'
string text = "hidden";
richTextBox1.SelectedRtf = @"{\rtf1\ansi\v " + text + @"\v0}";
richTextBox1.Select(0,0);
The RTB showed just "test", the cursor was at the beginning of the line, as expected.

Then I tried to select something via code:
richTextBox1.Select(1,8);
and, like I expected, the RTB selected "es" inside "test".

That's what I meant in my previous posting: richTextBox1.Text is "tehiddenst" and selection has to occurr according to this string. In my sample the selection goes from the first 'e' (index 1) 8 characters to the right ('ehiddens'). Since the hidden part isn't shown, only 2 characters are shown as selected, even though 8 characters actually are selected.

Regards,
mav
GeneralRe: RichTextBox and hidden Text Pin
Beringer2-Feb-06 7:49
Beringer2-Feb-06 7:49 
GeneralRe: RichTextBox and hidden Text Pin
Beringer2-Feb-06 19:53
Beringer2-Feb-06 19:53 
GeneralRe: RichTextBox and hidden Text Pin
mav.northwind2-Feb-06 22:33
mav.northwind2-Feb-06 22:33 
GeneralRe: RichTextBox and hidden Text Pin
Beringer3-Feb-06 4:25
Beringer3-Feb-06 4:25 
Questionreference exe assembly in visual studio Pin
alexrait11-Feb-06 5:37
alexrait11-Feb-06 5:37 
AnswerRe: reference exe assembly in visual studio Pin
Colin Angus Mackay1-Feb-06 5:49
Colin Angus Mackay1-Feb-06 5:49 
GeneralRe: reference exe assembly in visual studio Pin
alexrait11-Feb-06 5:53
alexrait11-Feb-06 5:53 
GeneralRe: reference exe assembly in visual studio Pin
Dave Kreskowiak1-Feb-06 7:02
mveDave Kreskowiak1-Feb-06 7:02 
GeneralRe: reference exe assembly in visual studio Pin
alexrait11-Feb-06 8:15
alexrait11-Feb-06 8:15 
GeneralRe: reference exe assembly in visual studio Pin
Dave Kreskowiak1-Feb-06 9:12
mveDave Kreskowiak1-Feb-06 9:12 
GeneralRe: reference exe assembly in visual studio Pin
mav.northwind1-Feb-06 9:47
mav.northwind1-Feb-06 9:47 
AnswerRe: reference exe assembly in visual studio Pin
Dave Kreskowiak1-Feb-06 5:51
mveDave Kreskowiak1-Feb-06 5:51 
AnswerRe: reference exe assembly in visual studio Pin
Daniel Grunwald1-Feb-06 6:32
Daniel Grunwald1-Feb-06 6:32 
GeneralRe: reference exe assembly in visual studio Pin
alexrait11-Feb-06 6:36
alexrait11-Feb-06 6:36 
QuestionLine number and filenames? Pin
Brian R1-Feb-06 5:18
Brian R1-Feb-06 5:18 
AnswerRe: Line number and filenames? Pin
leppie1-Feb-06 11:50
leppie1-Feb-06 11:50 
QuestionHow can i hit the lines in Compact Framework? Pin
pmasknguyen1-Feb-06 5:05
pmasknguyen1-Feb-06 5:05 

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.