This message contains graphics. If you do not see the graphics: Graphic Version.
Using Drag and Drop, More HTML Docs, Free Advert For Your TX App

Web Site Stuff

We have again updated the HTML documentation on our web site. If you want to keep really up to date, then maybe you should see what is new. Full HTML docs and PDF docs can be now downloaded.

Since we launched the Source Code Library it has become one of our most popular pages. So, if you have not had time to take a look at all the sample applications what we have on offer, do so now! Just click on the link above and you will have access to all the sample source code that we have published in the last six months - the time that the newsletter has been running.

Talking of which: Did you know what all past editions of the TX Text Control Newsletter can be searched online? If you are looking for vital information on how to squeeze the very last drop of power out of TX Text Control, then we can only recommend that you peruse the archives!

Naturally, you can also search the archives just as easily, by using the search wizard located on the top of the archives page.

Top TX Tip: How To Drag And Drop An Image Into TX Text Control

This week we are going to show you how to make the most of the drag&drop functionality of TX Text Control.

To start off, have a look at the Visual Basic samples that are shipped with TX Text Control.

Here you should find a little sample application called "DragDrop". This sample shows how to use the new drag&drop functionality to move selected text into a Text Control.

This weeks' Top TX Tip shows how to use this feature to place an image with the mouse into a Text Control.

Here is the Visual Basic code:

Private Sub TXTextControl1_DragDrop(Source As Control, X As Single, Y As Single) HorizontalScroll = TXTextControl1.ScrollPosX X = (X + HorizontalScroll) VerticalScroll = TXTextControl1.ScrollPosY Y = (Y + VerticalScroll) TXTextControl1.ObjectInsertFixed 0, "Image.bmp", X, Y, 100, 100, 0, 1, 3, 2, 0, 0, 0, 0 End Sub

First of all, you need a PictureBox that contains the same image, which will be inserted by the ObjectInsertFixed method. The DragMode of the PictureBox needs to be set to Automatic, so that it can be dragged.

The DragDrop event returns the current coordinates in twentieths of a point. These X and Y values need to added up with the current scroll position of the TX Text Control. To get these values we use the ScollPosX and ScrollPosY properties of the TX Text Control, which specify the position of the scroll bars in TWIPs*. The new values will be used as the PosX and PosY parameters of the ObjectInsertFixed method.

After this the picture will be inserted exactly at the position where image is dropped.

* Just in case you were wondering, a TWIP is a unit of measurement that is equal to 1/20 of a point, or 1/1440 of an inch. There are 567 TWIPs in a centimeter.

Free Advertising For Your TX Text Control Application

For you long-time TX users, I guess you are getting fed up of reading about this, but as there are more than 1200 new TX Text Control Newsletters readers per month, I do have to repeat this about once a month. Please do not despair!

So, to all you new to TX Text Control: We would like to give you the opportunity of free advertising for your TX Text Control based product on our web site.

All we ask is that you send us your text, as well as a few screenshots detailing how you used TX Text Control in your software application and within about two days of receiving this material, we will add your story, along with your logo and your name to our sample application pages.

So far we have had a terrific response to our request for sample TX Text Control applications from the hard core TX users, but I know there are thousands of other TX based applications out there - all of which should be added to the sample application page. Just send me a short text, explaining how you used TX Text Control to implement your application and you get free advertising for this product on our web site. I'm looking forward to receiving your material!

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.