RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TControl.SetTextBuf Method

Sets the text of the control.

Pascal
procedure SetTextBuf(Buffer: PChar);
C++
__fastcall SetTextBuf(const char * Buffer);

Call the SetTextBuf method to set the text of the control to the text in the specified buffer. 

The text is set to the text in the buffer pointed to by the Buffer parameter. Buffer must point to a null-terminated string. The SetTextBuf method sends the WM_SETTEXT and CM_TEXTCHANGED messages. If done in the tight execution of a function, this could result in the change not being seen until messages from the Windows message queue being processed after the function finishes executing. To interrupt a function's execution and process messages, use the ProcessMessages method of the Application object.

Note: The SetTextBuf method is provided for backwards compatibility only. To set the text of a control now, assign a string value to the Text property.
 

 

Text 

application 

ProcessMessages

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!