Opened 10 years ago

Closed 10 years ago

#2874 closed Bug (Fixed)


Reported by: mLipok Owned by: Jpm
Milestone: Component: Standard UDFs
Version: Severity: None
Keywords: Cc:


the same problem like HERE:



#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#include <GuiRichEdit.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
#EndRegion ### END Koda GUI section ###

$sText = _
        "ABCD" & @CRLF & _
        "EEEE" & @CRLF & _
        "AAAA" & @CRLF & _

$hRichEdit = _GUICtrlRichEdit_Create($Form1, "", 100, 100, 150, 150)
_Magic($hRichEdit, $sText)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE


Func _Magic(ByRef $hRichEdit, $sText)
    Local $aTextTemp = StringSplit($sText, @CRLF, 1)

    For $i = 1 To $aTextTemp[0]
        Sleep(100) ; this can be removed
        _GUICtrlRichEdit_SetCharColor($hRichEdit, Dec("00FF00"))
        Sleep(100); this can be removed
        _GUICtrlRichEdit_InsertText($hRichEdit, $i)
        Sleep(100); this can be removed
        Sleep(100); this can be removed
        _GUICtrlRichEdit_SetCharColor($hRichEdit, Dec("000000"))
        Sleep(100); this can be removed
        _GUICtrlRichEdit_InsertText($hRichEdit, " " & $aTextTemp[$i] & @CRLF)
        Sleep(100); this can be removed

EndFunc   ;==>_Magic

change this:

If $ai[0] = $ai[1] Then
	Return _SendMessage($hWnd, $EM_SETCHARFORMAT, $SCF_ALL, $tCharFormat, 0, "wparam", "struct*") <> 0
	Return _SendMessage($hWnd, $EM_SETCHARFORMAT, $SCF_SELECTION, $tCharFormat, 0, "wparam", "struct*") <> 0

to this:

	Return _SendMessage($hWnd, $EM_SETCHARFORMAT, $SCF_SELECTION, $tCharFormat, 0, "wparam", "struct*") <> 0

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by mLipok

and in HelpFile there is:

Sets the color of selected text or, if none selected, sets the background color of text inserted at the insertion point

but word background should be removed.

comment:2 Changed 10 years ago by Jpm

  • Milestone set to
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [11053] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jpm.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.