Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Sets the text format

 

Syntax

 

lretCode = XPButton_SetTextFormat(hwnd, ctrlID, dwTextFlags [, Redraw])

 

Returns

 

Number.

 

Parameters

 

Name

Type

Optional

Meaning

hWnd

Number

No

Handle of the dialog containing the control

ctrlID

Number

No

Control identifier

dwTextFlags

Number

No

Format values.

Default: %DT_CENTER OR %DT_VCENTER OR %DT_SINGLELINE

 

Use one or more of the following equates:

 

%DT_BOTTOMRenders the text string at the bottom of the display rectangle. This value is used only with the DT_SINGLELINE value.
%DT_CALCRECTDetermines the width and height of the display rectangle.
%DT_CENTERCenters text horizontally in the display rectangle.
%DT_EDITCONTRODuplicates the text-displaying characteristics of a multiline edit control. Specifically, the average character width is calculated in the same manner as for an edit control, and the function does not display a partially visible last line.
%DT_END_ELLIPSISTruncates a text string that is wider than the display rectangle and adds an ellipsis to indicate the truncation. The string is not modified unless the %DT_MODIFYSTRING flag is specified.
%DT_EXPANDTABSExpands tab characters. The default number of characters per tab is eight. The %DT_WORD_ELLIPSIS, %DT_PATH_ELLIPSIS, and %DT_END_ELLIPSIS values cannot be used with the %DT_EXPANDTABS value.
%DT_EXTERNALLEADINGIncludes the external leading of a font in the line height. Normally, external leading is not included in the height of a line of text.
%DT_HIDEPREFIXIgnores the prefix character & in the text. The letter that follows is not underlined, but other prefix characters are still processed. For example:
input string: "A&bc&&d"
normal: "Abc&d"
%DT_HIDEPREFIX: "Abc&d"
%DT_LEFTAligns text to the left.
%DT_MODIFYSTRINGModifies a string to match the displayed text. This value has no effect unless %DT_END_ELLIPSIS or %DT_PATH_ELLIPSIS is specified.
%DT_NOCLIPDraws the text string without clipping the display rectangle.
%DT_NOFULLWIDTHCHARBREAKPrevents a line break at a double-byte character set (DBCS), so that the line-breaking rule is equivalent to single-byte character set (SBCS). This can be used, for example, to make icon labels written in Korean text more readable. This value has no effect unless %DT_WORDBREAK is specified.
%DT_NOPREFIXTurns off processing of prefix characters. Normally, DrawThemeText interprets the prefix character & as a directive to underscore the character that follows, and the prefix characters && as a directive to print a single &. By specifying %DT_NOPREFIX, this processing is turned off. For example:
input string: "A&bc&&d"
normal: "Abc&d"
%DT_NOPREFIX: "A&bc&&d"
%DT_PATH_ELLIPSISReplaces characters in the middle of text with an ellipsis so that the result fits in the display rectangle. If the string contains backslash (\) characters, %DT_PATH_ELLIPSIS preserves as much as possible of the text after the last backslash. The string is not modified unless the %DT_MODIFYSTRING flag is specified.
%DT_PREFIXONLYDraws only an underline at the position of the character following the prefix character &. Normally DrawThemeText interprets the & as a directive to underline the character that follows and the prefix characters && as a directive to print a single &. By specifying %DT_PREFIXONLY, no characters are drawn, only an underline. White spaces are placed in the positions where characters would normally appear. For example:
input string: "A&bc&&d"
normal: "Abc&d"
DT_PREFIXONLY: " _   "
%DT_RIGHTAligns text to the right.
%DT_RTLREADINGLays out text in right-to-left order for bidirectional text, for example, text in a Hebrew or Arabic font. The default direction for text is left-to-right.
%DT_SINGLELINEDisplays text on a single line. Carriage returns and line feeds do not break the line.
%DT_TABSTOPSSets tab stops.
%DT_TOPRenders the text at the top of the display rectangle.
%DT_VCENTERCenters text vertically. This value is used only with the %%DT_SINGLELINE value.
%DT_WORDBREAKBreaks lines between words if a word would extend past the edge of the display rectangle. A carriage return/line feed ($CRLF) sequence also breaks the line.
%DT_WORD_ELLIPSISTruncates any word that does not fit in the display rectangle and adds an ellipsis.

Redraw

Number

Yes

%TRUE or %FALSE to force a redraw of the control

 

Remarks

 

Restrictions

 

See also

 

Examples

 

 

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software