M
Martin Heuckeroth
Hi,
We are looking for a way to determine the x and y points of the cursor
in a richtext box.
We made an VB.NET application with a couple of listboxes and one of
them is a richtextlistbox. After a refresh the cursor of the
richtextlistbox is reset and goes to top. And that's not a cool thing
when you are reading at the bottom of that box and have to look up the
point where your were reading manual to have it reset after another
refresh.
So my guestion is how can we store the x,y coordinates of the cursor
in the richtextbox so we can restore the cursor position after the
refresh.
Dim nSearch As Integer = ListBoxSearchItems.SelectedIndex
Dim nTeamroom As Integer = ListBoxTeamroom.SelectedIndex
Dim nRow As Integer = RichTextBoxMemo.
Dim nColumn As Integer = RichTextBoxMemo.
RefreshDataSet()
If (nSearch > -1) And (nSearch < ListBoxSearchItems.Items.Count)
Then ListBoxSearchItems.SetSelected(nSeach, True)
If (nTeamroom > -1) And (nTeamroom < ListBoxTeamroom.Items.Count)
Then ListBoxTeamroom.SetSelected(nTeamroom, True)
SeekInfo()
We started playing with the "GetPositionFromCharIndex(ByVal index As
Integer) As Point" function but don't get that to work. Any code will
be apperciated.
thx, Martin
We are looking for a way to determine the x and y points of the cursor
in a richtext box.
We made an VB.NET application with a couple of listboxes and one of
them is a richtextlistbox. After a refresh the cursor of the
richtextlistbox is reset and goes to top. And that's not a cool thing
when you are reading at the bottom of that box and have to look up the
point where your were reading manual to have it reset after another
refresh.
So my guestion is how can we store the x,y coordinates of the cursor
in the richtextbox so we can restore the cursor position after the
refresh.
Dim nSearch As Integer = ListBoxSearchItems.SelectedIndex
Dim nTeamroom As Integer = ListBoxTeamroom.SelectedIndex
Dim nRow As Integer = RichTextBoxMemo.
Dim nColumn As Integer = RichTextBoxMemo.
RefreshDataSet()
If (nSearch > -1) And (nSearch < ListBoxSearchItems.Items.Count)
Then ListBoxSearchItems.SetSelected(nSeach, True)
If (nTeamroom > -1) And (nTeamroom < ListBoxTeamroom.Items.Count)
Then ListBoxTeamroom.SetSelected(nTeamroom, True)
SeekInfo()
We started playing with the "GetPositionFromCharIndex(ByVal index As
Integer) As Point" function but don't get that to work. Any code will
be apperciated.
thx, Martin