D�finit le texte d'un contr�le
#include <GuiRichEdit.au3>
_GUICtrlRichEdit_SetText ( $hWnd, $sText )
$hWnd | Handle du contr�le |
$sText | Texte brut ou RTF � mettre dans le contr�le |
Succcess: | Retourne True. |
�chec: | Retourne False et d�finit @error <> 0. |
@error: | 101 - $hWnd n'est pas un handle |
D�finit tout le texte. Le texte peut �tre du texte brut ou RTF.
Maintient la pile d'annulation.
_GUICtrlRichEdit_AppendText, _GUICtrlRichEdit_EmptyUndoBuffer, _GUICtrlRichEdit_GetText, _GUICtrlRichEdit_InsertText, _GUICtrlRichEdit_ReplaceText
#include <GUIConstantsEx.au3> #include <GuiRichEdit.au3> #include <WindowsConstants.au3> Example() Func Example() Local $hGui, $iMsg, $hRichEdit $hGui = GUICreate("Exemple (" & StringTrimRight(@ScriptName, StringLen(".exe")) & ")", 320, 350, -1, -1) $hRichEdit = _GUICtrlRichEdit_Create($hGui, "Ceci est un test.", 10, 10, 300, 220, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) GUISetState(@SW_SHOW) _GUICtrlRichEdit_SetText($hRichEdit, "Premier paragraphe") While GUIGetMsg() <> $GUI_EVENT_CLOSE Wend _GUICtrlRichEdit_Destroy($hRichEdit) ; N�cessaire si le script se bloque ; GUIDelete() ; est OK aussi EndFunc ;==>Example