Please enable JavaScript to view this site.

A-Shell Reference

Navigation: » No topics above this level «

TXTCTL

Scroll Prev Top Next More

 

 

TXC.CTLNO

When multiple XTEXT controls are in simultaneous use, specifies which one (range is 0 through 4) to use for this call. If opcode = TXOP_CREATE, you can set TXC.CTLNO to –1 to have XTEXT automatically assign the next available control number. If the control is modeless, you will need to save the returned TXC.CTLNO value for referencing it in subsequent calls. If you use only one XTEXT control at a time, you can just set this to 0 and ignore it.

 

TXC.KBDSTR

This field is used to specify the keyboard string that will be transmitted when this control is clicked (when not already active.) Typically you would set it to a Virtual Key Code, such as VK_xF101, so that if this control was clicked while another control had the focus, that control would exit with the corresponding exitcode value (-101 in this case) allowing your app to take the necessary action to switch the focus to this control.

 

TXC.OUTLINES

This field is updated on exit to indicate the number of logical lines of text as displayed. Note since in most cases, lines are soft-wrapped in a manner dependent on several variable factors, so the number of lines might easily change. It is probably most useful in conjunction with the TXC.WRAPWIDTH field, since in that case it might be used to estimate the number of storage records needed (assuming each logical line was saved in a single storage record).

 

TXC.FONTFACE

This can optionally be set to any of the standard Windows font typeface names, e.g. "Courier New", "Arial", "Times Roman", etc. If not set, then the standard Windows dialog font will be used.

To specify a fixed pitch font, you should specify one of the typeface names that is known to be fixed pitch (e.g. Lucida Console or Courier New). If you specify any font, you must also specify a size.

 

TXC.FONTSIZE

Unlike most other GUI controls which express the font size as a percentage of the "standard" size, the XTEXT control, being more like a "real" text editor or word processor, prefers to use printer point size units (e.g., 12 for 12 point type.) You can also specify the font size in twips, in which case set TXC.FONTSIZE to negative the desired number of twips in height.

If you specify a non-blank font (in TXC.FONTFACE), you must also specify a non-zero size (or else you will get microscopic text). Note that regardless of the specified font size, the user can increase or decrease the display magnification using the Ctrl+Plus and Ctrl+Minus keys, or using the zoom dropdown on the toolbar.

 

TXC.FMAPAPP

This is a 32 bit bitmap similar to TXC.FMAPCTL except that it specifies which function keys are to be sent to the application. (This requires that the TXF_FKEYS flag be set). Such keys will cause the control to exit with exitcode set to -1 through -16 and -17 through -32 for F1 through F16 and Shift+F1 through Shift+F16 respectively.

 

TXC.FPROTCLR

This field is similar to TXC.FCOLOR except it applies only to protected text. Protected text is normally displayed in a slightly lighter shade from the regular text, but if the distinction is not enough for you, you can set it to anything you like with this field. Alternatively you may find that it looks better to set the protected text background color to a light shade of gray (e.g. &h00D8D8D8).