Jump to content

RichEdit -> Set bold; Italics; Underlined


FireFox
 Share

Recommended Posts

Hi,

I use RichEdit UDF because I want an Input where I can put color and format of text where I want...

I found this functions :

_GUICtrlRichEdit_SetBold

_GUICtrlRichEdit_SetItalic

_GUICtrlRichEdit_SetUnderline

But the problem is that function only set Bold; Italics; Underlined to all the text; but I want to set only parts of text...

Another problem :

At start when you create your RichEdit input, the font and weight are big, so i place this code :

_GUICtrlRichEdit_SetFontName($mt, 'Arial')
_GUICtrlRichEdit_SetFontSize($mt, 8)
_GUICtrlRichEdit_SetBold($mt, False)

I works at start, but when I change the text of the RichEdit, it returns to the big font and I can't change it :)

Thanks for anyhelp :)

Cheers, FireFox.

Link to comment
Share on other sites

The funcs set the style to the selected text.

To set default font, you have to specify FALSE as third parameter: _GUICtrlRichEdit_SetBold($mt, False,False)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

@ProgAndy

hm...it doesn't work for _GUICtrlRichEdit_SetBold($mt, False,False) because when I use _GUICtrlRichEdit_SetTextEx, the font is reset...

The funcs set the style to the selected text.

the problem is that I want to set the color to RichEdit input without to select anything...

Example : 'RichEdit' to 'RichEdit'

Cheers, FireFox.

Edited by FireFox
Link to comment
Share on other sites

You have to use set the selection and then the style or use RTF-tags.

Why the default font-setting doesn't work, i don't know. I'm not that familiar with the RichEdit-functions.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...