HOME   DOWNLOADS   ORDER ONLINE   CONTACT US



 OVERVIEW
 
 DOWNLOAD
 
 ORDER ONLINE
 
 KNOWLEDGE
 BASE

How to Clip, Wrap, Tab and Truncate

SBList offers a number of options to control the display of your text, and at first the choice can be quite bewildering. Here is an explanation of how the different features work.

Tabs

SBList allows you to set up to 32 tab positions within a list, creating 33 columns of information. By default all the tabs are set to 0, so if you create a list without setting the tabs and then add lines to the list which contain tab characters, you will end up with all your text over-printing itself:

You don't have to set tabs in sequential order, so you can have your first tab at 100 pixels from the left-hand side of the list box, and your second tab 10 pixels from the left if you want.

Wrapping

When you want to display text on more than one line, you need to set your tabs carefully or you may not end up with what you expected, as you can see in the example above. Here we have tabs set (in order) at 30, 140, and 30 again.

The first tab sets where the bold caption appears, the second tab places the Page number, and the third tab places the italic sub-text underneath the bold caption. The actual text which was added as the first line of the list was:

"1.\t\BHello world!\b\tPage 1\n\t\IThe Introduction\i"
Clipping

The ClipText and AutoClip properties control the over-printing of text in one column over the next column. When you have AutoClip set to True, the text in one column will only spill into the next column if that column is empty, otherwise it will be truncated:

AutoClip = False, ClipText = False

Without clipping, text simply appears over the top of whatever might be underneath. This can be used to your advantage; for example, you can deliberately print over a bitmap.

AutoClip = True, ClipText = False

With AutoClip set to true, the addition of the page number in the second line prevents the text from continuing, so over-printing is avoided.

AutoClip = False, ClipText = True

With ClipText set to true, the 'intelligence' is taken out of clipping so that text is truncated whether it would cause over-printing or not.

The Ellipsis property can tidy up clipping by truncating a word to fit as many complete characters as possible in the space available (so that you don't get half a letter as above), and then adds three periods ( ... ) to show that truncation has taken place.

Topic devised by Andy Groom.

 
Copyright © 2000 Global Components. All rights reserved.