Hi everyone, I am new to RichTextBox control in VB6
I wanted to select the entire line/row in the RichTextBox, where currently the cursor is.
How should I do it ?
The code should be paste in command button 'cmdSelect'
Thanks in advance :)
horizondesai
0
Newbie Poster
Recommended Answers
Jump to PostThe RichTextBox control doesn't have a simple way to do this. Also, it's not really standard CUA/GUI behavior. Usually if there's a text box, selecting text is done via mouse drag or via keyboard (e.g. <SHIFT><END>).
That being said, of course it is possible to do. Much depends on …
Jump to PostThis behavior is caused by setting the RichTextBox1.Text value. When you do that, it resets the RichTextBox.SelStart value to zero, effectively nullifying any prior RichTextBox.SelBold settings. You should actually be using the RichTextBox1.SelText property instead of the .Text property.
Here's a little piece of "science experiment" code to demonstrate …
All 5 Replies
BitBlt
452
Practically a Master Poster
Featured Poster
horizondesai
0
Newbie Poster
horizondesai
0
Newbie Poster
BitBlt
452
Practically a Master Poster
Featured Poster
horizondesai
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.