New section: Video Tutorials
We have just started a new section in the documentation rubric of www.textcontrol.com.development. 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.SelStart = newPos
InputPosHelpText = False
TXTextControl3.Visible = False
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
Please have a look at the complete running sample to find out how it works.
The Newsletter Team