This message contains graphics. If you do not see the graphics: Graphic Version.
New video tutorials, Move images inserted as a character

New section: Video Tutorials

We have just started a new section in the documentation rubric of The 'Video Tutorials' section archives the video tutorials that we are going to release in the next few weeks.

To whet your appetite, we currently have one video for you. It illustrates how easy it is to create PDF files using TX Text Control - all you have to do, is select 'Export to PDF' from your application and the PDF file is created. There is no need for any third party plug ins.

Before you download the video, please follow these three simple steps to install the appropriate screen cam codec at:

This installs a very small screen cam codec on your PC. If you do not do this, you will not be able to view the videos. The codec installation takes about 15 seconds!

Once, you have done that, please download the video itself from:

We would like your feedback on these videos. What would you like us to cover? Please post your comments into the forum at:

Please note that this video is for absolute beginners! If you are an advanced user of TX Text Control, then you will already know how to achieve what we show you. We will be making several advanced topic video tutorials shortly. Watch this space :-)

How to move images that are inserted as a character

There are two approaches to inserting images into TX Text Control:

Either you can insert an image at a fixed position. This can then be moved with the build-in mouse interface.

Or you can insert an image as a character. This is then handled as a character in the text.

We are often asked how it is possible to move images in a document when they have been inserted as a character. This newsletter shows you how:

Firstly of all, we insert an image in a field, so that we are later able to check whether an image has been clicked or not. Then, we get the start position at which the image is located.

Secondly, we use the InputPosFromPoint method to get the position at which the user has clicked, in order to specify the new destination of the image. After that we simply use the Clip method to cut and paste the image to its new specified location.

Private Sub TXTextControl1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If (TXTextControl1.FieldAtInputPos <> 0) Then StartingPosition = TXTextControl1.SelStart newPos = TXTextControl1.InputPosFromPoint(X, Y) TXTextControl1.SelStart = StartingPosition - 1 TXTextControl1.SelLength = 1 TXTextControl1.Clip 1 TXTextControl1.SelStart = newPos TXTextControl1.Clip 3 InputPosHelpText = False TXTextControl3.Visible = False End If End Sub

Additionally, we use a second TX Text Control to display a help text with the new input position. Again we use the InputPosFromPoint method with the parameters of the MouseMove event to get the new potential position.

Private Sub TXTextControl1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If (InputPosHelpText = True) Then TXTextControl3.Text = \" New input position: \" & TXTextControl1.InputPosFromPoint(X, Y) TXTextControl3.Move X + 100, Y End If End Sub";

Please have a look at the complete running sample to find out how it works.

Best regards

The Newsletter Team

Text Control GmbH respects your online time and privacy. We only send this newsletter to TX Text Control customers and people who have signed up to receive it. However, if you would prefer not to receive future issues of the newsletter, you may unsubscribe at any time. If you received this newsletter forwarded from a colleague or friend, you may wish to subscribe directly.

Sent to: N/A.

Imprint | Unsubscribe | Subscribe

© 2020 Text Control GmbH. All Rights Reserved.