PDA

View Full Version : .net: losing focus with selection.Start [TX .NET prerelease]


Unregistered
December 12, 2002, 18:24:15
Support,

I don't know if this is a bug, or if multiple commands present the same, but think I should pass it on, just in case.

We are not at the point that we are manipulating in any way the TX control. We are still working on our framework, with the fundamental functions: creating controls, opening, saving, user options, routing menu and keyboard commands, etc.

What we noticed though is if in our FileOpen procedure we end it by setting the input position with Selection.Start = 0 the control loses focus. (We needed to do this in working with v8, else the caret didn't show, though such is unnessary in v10 net.) No m_ActiveTX.Focus, or any other commands seems to be able to get the focus back.

Thought you might want to test this before the final release. (Sorry we don't have more scenarios to give.)


This message was originally posted by Vann Joe in the old TX Text Control Support Forum.

Christopher Krause
December 13, 2002, 18:18:02
Hi Vann,

you have to set the Focus back to the textcontrol, if you are using a button, because after clicking on the button, the focus is on the button:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextControl1.Selection.Start = 0
TextControl1.Focus()
End Sub

If you are using a menu, it works without setting the focus.

Regards,
Christopher Krause, TXTextControl


This message was originally posted by Christopher Krause in the old TX Text Control Support Forum.

Unregistered
December 13, 2002, 18:28:30
Hi Christopher,

It was a menu item, file open. Even putting the TX.Focus following the Selection.Start did not resolve things. It could just be in that one procedure, for we're setting the tab page text, the program title text, setting recent file list, etc. If you can't duplicate it, we'll assume that it was just the combination of things, and on top of that, we don't need it there. :-)


This message was originally posted by Vann Joe in the old TX Text Control Support Forum.