I would like for the curser to change from the default iBeam to a hand once it's entering the line that is bolded.
Ideally I would like to see it function like hypertext.
I've added a snippet of what it currently looks like at the bottom.
Bonus: Also, it would be create if someone can tell me how to keep text from getting highlighted when I click the clickable Bold item
This is the code for clicking a portion of the RTB
$firstChar = $richtextbox1.GetFirstCharIndexOfCurrentLine()
$currentLine = $richtextbox1.GetLineFromCharIndex($firstChar)
$currentLineText = $richtextbox1.Lines[$currentLine]
if ($currentLineText -like "Username: *")
{
$richtextbox1.Select($firstChar, $richtextbox1.TextLength)
$buttonSetUser.PerformClick()
$ticket.Text = "Ticket #"
}
Change curser over RichTextBox line when that text is bold
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Change curser over RichTextBox line when that text is bold
- Attachments
-
- rtb_snip.PNG (6.64 KiB) Viewed 2016 times
Re: Change curser over RichTextBox line when that text is bold
You have to track the mouse and read what is under the mouse cursor. That will be very complex piece of programming. Your request seems to indicate that you likely should not be doing this with an RTF control.
Second question seems to be of the same order of misuse of control. It is critical to design to the controls and their intended method of use. WHile it is often possible to stretch a controls use it is more often a bad idea in code and in design.
Second question seems to be of the same order of misuse of control. It is critical to design to the controls and their intended method of use. WHile it is often possible to stretch a controls use it is more often a bad idea in code and in design.