Note: I am talking about the text box cursor (aka the vertical line that shows where you're typing. Not the mouse)
As the nice note says above, I'm trying to get the location of the text cursor as a Point so I can show a popup below it. How do I do this?
Text box has a GetRectFromCharacterIndex method that you can use. For example:
textbox.GetRectFromCharacterIndex(textbox.CaretIndex)
Related
I am working on a project with a third-person template added. I want to have a box where text popups along with two buttons yes and no. I added Text and a button from UI options but my mouse is not going over Button(the highlighted colour is not coming up). Is it because the mouse is already assigned to move my player camera or something, or do I need to do code something particular ?
Thank you
I have a rich textbox that is loaded from a text file.
each time I click a certain button, the yellow bar moves to highlight the next line as illustrated in the picture.
the problem is, when the textbox size is not enough to show the complete text, I want to make the yellow bar automatically scroll to the first line that is not shown without moving manually the scroll bar.
how can I do this?
I have created a texteditor along with a function window.
the functionwindow is a listbox that is populated with all of the functions located in the textbox.
when the user double clicks on an item in the listbox, the textbox will find the function that was clicked on. its just using a simple search to find the text. the issue is that if the text is at the bottom of the window, then you still need to scroll to display it properly. is there a way to ... If line 200 of a textbox was located at the bottom of the screen to make it show at the top??? does this make any sense to anybody
Is it the ScrollToCaret function you want?
i am relatively new to C#. can anybody please tell me how to display the tool tip on the text editor...just as VS intellisense expands a particular method when we move the mouse over it??? Since i am Developing an adding i want the tool tip to be displayed on document (there is no form associated with it) how to get the text under the mouse pointer thanx in advance
Off the top of my head look at the ToolTip class. I am sure you need to supply it with the x,y coordinates of where you want it to be displayed. So you just need to get the x,y coordinates of the mouse which should be simple enough.
I'm trying to create something like a tooltip suddenly hoovering over the mouse pointer when specific words in the richt text box is hovered over. How can this be done?
You can use MouseMove and then GetCharIndexFromPosition to determine which character the mouse is over, then display the associated tooltop.