[api-dev] How to move the CurrentController from a button to a xTextRange

2006-03-22 Thread Peter Eberlein
Hi, to reproduce the problem: Create a text document with two pages; on page one a xTextRange and on page two a push button which triggers the following snippet: oViewCursor.GotoRange(xTextRange, False) 'or 'oDoc.CurrentController.Select(xTextRange) oViewCursor.SetVisible(true) The xTextRange is

Re: [api-dev] How to move the CurrentController from a button to a xTextRange

2006-03-22 Thread Steffen Grund
Hi Peter, add the following lines to the end of the macro that is executed when the button is pressed: xWindow = ThisComponent.currentController.Frame.ContainerWindow xWindow.setFocus() This sets the focus back to the document, HTH, Steffen Peter Eberlein wrote: Hi, to reproduce the

Re: [api-dev] How to move the CurrentController from a button to a xTextRange

2006-03-22 Thread Peter Eberlein
Hi Steffen, thx for the fast answer, Peter Steffen Grund schrieb: Hi Peter, add the following lines to the end of the macro that is executed when the button is pressed: xWindow = ThisComponent.currentController.Frame.ContainerWindow xWindow.setFocus() This sets the focus back to the