New Version Of TX Text Control
Yesterday was a big day for us - a day that we had been waiting to celebrate for weeks. Version 7.04 of TX Text Control was released.
So, "what's new?" I hear you shout. Well, for Visual Basic and Delphi users, the answer is 'not much'. However, there is good news for Microsoft Visual C++ programmers.
Shipped with the Professional Version is the TX Text Control Class Library, which enables software developers to use TX Text Control with Microsoft Visual C++ and the Microsoft Foundation Classes (MFC).
Apart from the support for Microsoft Visual C++, the biggest difference between version 7.03 and version 7.04 is the way in which TX Text Control is purchased.
Up until now you downloaded the trial version and then when you had played with it for a short time, and you decided that you wanted to buy it, you simply bought a serial number, entered it into your TX Text Control and bingo! you had a full version.
This is no longer the case. The trial version of TX Text Control can not be registered anymore.
Now, if you would like to purchase the full version of TX Text Control, it is necessary for you to download the full version from our web site. Then, when you install it, your current trial version will be replaced - thanks to a new intelligent setup routine - with the full version.
What's more, we have just released a brand new Online Ordering System, where you can order and download the full version via ESD (Electronic Software Delivery) or request to have the software sent to you on a CD-ROM. If you decide to purchase the software using ESD, we make a backup of your copy of TX Text Control on our web server, so that you can download it again at any time. This comes in handy if you 'loose' the original files that you downloaded.
Why not take a look at the new Online Ordering System - it is a great improvement on the first version (!!)
New Service Pack Now Available
You can now get the latest service pack from the download section. Please note that SP3 does NOT include the Microsoft Visual C++ Class Library. The Class Library is NOT available as a service pack. It must be purchased as an update. The following terms apply:
- If you have the Standard Version of TX Text Control v7, then please update to the Professional Version to get the Microsoft Visual C++ Class Library.
- If you already have the Professional Version of TX Text Control v7 and you wish to get hold of the new Class Library, then you may take advantage of the special update price of USD 149.00. Please note that this update cannot be purchased online. Should you wish to order, please send us an e-mail or fax - or indeed give us a call. All the contact information you need is here.
Top TX Tip: Imaginative View Modes
As we are sure you can know: the days running up to a new version are always a bit on the stressful side. As a result, this week, we have only got a quick Top TX Tip.
Taking TX Text Control out of the box, it supports two different view modes. However, using a bit of imagination you can add a whole multitude of new ones.
How about 'Zoom-to-Page' mode? In this mode the zoom factor of the current TX Text Control is set so that the width of page is set to the window. As a result the entire width of the document can be seen.
What about 'Auto Line Break' mode? You can find such a mode in most e-mail programs. Take for example Netscape Messenger. Every time you pass a certain character - in most cases the 70th - the text is broken onto the next line. You can configure TX Text Control to break text at the edge of the window to create a very similar effect.
OK, sounds good. Tell me how I can perform such feats. To get us stared, we need the 'Simple' demonstration program shipped with TX Text Control. We are going to take this application as it is and add a few of these new view modes.
Out of the box, the 'Simple' sample program has two menu points, which allow us to switch between the various modes. The main change is in the AdjustPage method. Here is the Visual Basic code:
Private Sub AdjustPage()
Const ScrollbarWidth = 300, TXMinZoom = 10, TXMaxZoom = 255,
MinHeight = 720, MinWidth = 720
Dim nNewZoom As Integer, nWidth As Integer, nHeight As Integer
If (mnuZoom.Checked) Then
nNewZoom = 100 * (ScaleWidth - ScrollbarWidth) /
(TXTextControl1.PageWidth - TXTextControl1.PageMarginL -
' Auto line break
nNewZoom = 100
If ScaleWidth > MinWidth Then
TXTextControl1.PageWidth = ScaleWidth - ScrollbarWidth +
TXTextControl1.PageMarginL + TXTextControl1.PageMarginR
If (nNewZoom < TXMinZoom) Then nNewZoom = TXMinZoom
If (nNewZoom > TXMaxZoom) Then nNewZoom = TXMaxZoom
TXTextControl1.ZoomFactor = nNewZoom
These methods are called from the Resize handler and changed to either the zoom factor of the TX Text Control or the page width - depending upon which mode is currently active.
In Autozoom mode we simply have to calculate the new zoom factor using the following rule of three:
100 % x %
------------- = --------------
Window width Document width
In the first case, we must not forget to subtract the scrollbar from the window width. Likewise, we have to subtract the margins from the document width, if they are not already 0. Finally, we have to check that the zoom factor is not outside the zoom factor that TX Text Control supports (10% to 255%). :-)
The auto line break mode is equally as easy to create. The zoom factor is simply set to 100%. If the ScaleWidth of the window is not smaller than the minimal width of the TX Text Control window, the PageWidth property is passed a new value. This is value is calculated with:
Window Width - Scrollbar - Width + Document Margins
Cool Control Site Of The Week
For this week we have found a magnificent web site. Looking at it from an aesthetical point of view or from its functionality, DesignerControls.com is packed with tons of FREE controls and source code for Visual Basic! They have got other great stuff like masses of articles and well-structured links. Be sure to take a good look at one of their flagship products: ImgX. Advanced Imaging for a Low Price! Add JPG, PNG, TGA, TIF, PCX, WMF, EMF, BMP support to your app at a fraction of the cost that the big boys charge.
The Newsletter Team