CTX library TextEdit control

I have been quiet for the past few weeks. Holidays only accounts for part of this quiet period. I have been engaged in writing a duplicate version of the TrueCTRL TextEdit object.

As you probably know, the new (and previous) TB editor is essentially the TextEdit control with a few extra frills and features added to it. Unfortunately this control object has a number of bugs that prevent me from doing all the things I would like. For example it doesn't have left and right margins so I have to fake them. It doesn't resize properly when a window is resized. It absorbs certain keystrokes that I would like to use. The restrictions are so extensive that I decided to write my own version and add it to all the other objects in the CTX library.

The CTX library is a duplicate of TrueCTRL that doesn't use the OBJECT sub-routine, instead it creates all its objects from scratch using TB graphics. It gives us more control over color and fonts, and provides more objects than TrueCTRL. It is used extensively in the new TB editor. For example, there is a bug in the push button object in version 5.5b19 so all push buttons have been replaced with CTX push buttons. Similarly there is a problem with List objects, which again have all been replaced with CTX objects.

The CTX version of the TextEdit control will allow us to have Right Click menus in the new TB editor. Similarly, the F keys will be available to us for cut/copy and paste actions like the old DOS editor. Ultimately we can also have keywords in color.

There are bound to be a few bugs in this new object, but at least I have access to the code so that I can resolve the problems. In the long term this has to be a better solution so please bear with me.

Big John


CTX version of TextEdit control

I have now completed the TextEdit control for CTX. This now means that the new editor can also have Right click menus, and can enable the F keys to work like the DOS editor.

My next task is to incorporate the CTX TextEdit control into the new editor. While I am doing this I will release version 5.604 i.e. virtually the same as 5.603 with the reported bugs removed.

Big John


marvelous, John!

Sounds great. is this a replacement for TBilt?

When it's done, how can we get it?



Hi Roger,

The CTX library is essentially a replacement for TrueCTRL library module. There are a number of weaknesses in TrueCTRL, e.g. lack of control over fonts and colors. The CTX library provides total control over fonts and colors for all objects. There are more objects in CTX including a right click floating menu and a data display object - like a list object but with rows and columns like a spreadsheet.

When TrueCTRL is used with version 5.5b19 there are a number of bugs that crop up that are not present in earlier versions. Push buttons in particular don't work properly. As a result, in the new editor I have had to replace most TrueCTRL objects with CTX objects. The TextEDit control also has several limitations so I am in the process of replacing that too.

TBILT is now out of date and has essentially been replaced by FORMS (available from the HELP menu in the new editor). FORMS starts off with a default window that can be resized and stretched in the normal way. Objects can be selected from a palette and one click will place the object in the window. This object can be dragged to any position and can be stretched to any size (rubber box method). A "properties" box allows you to customize this object (color, font, text etc). All objects are given a default ID but you change this in the properties box. Array data is automatically generated to populate lists and menus. A program can have up to 10 forms. The generated code is segregated into blocks - one block for each form. Forms can be modified or deleted at any time. Generated code can run immediately without the user adding any code. Obviously the user is expected to add code to respond to mouse clicks on various objects. To assist the user, Forms generates a sub-routine for each object where the user can enter code - there is a prompt in each routine.

Big John